diff --git a/docs/applications.html b/docs/applications.html index 506ada2..467bcaa 100644 --- a/docs/applications.html +++ b/docs/applications.html @@ -4,7 +4,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Desktop file for the applications @@ -201,50 +201,28 @@ @@ -260,16 +238,13 @@ for the JavaScript code in this tag. @@ -328,25 +303,6 @@ for the JavaScript code in this tag. -
-

Zathura

-
-
-
[Desktop Entry]
-Version=1.0
-Type=Application
-Name=Zathura
-Comment=A minimalistic document viewer
-Exec=zathura %U
-Icon=/usr/share/icons/Papirus/64x64/apps/zathura.svg
-Terminal=false
-Categories=Office;Viewer;
-Keywords=PDF;PS;PostScript;DjVU;document;presentation;viewer;
-
-
-
-
-

Weechat

@@ -409,18 +365,6 @@ for the JavaScript code in this tag.
-
-

TODO Transmission

-
-
-
[Desktop Entry]
-Type=Application
-Name=Torrent
-Exec=/usr/bin/env transadd %U
-
-
-
-

Images

@@ -434,39 +378,6 @@ for the JavaScript code in this tag.
-
-

TODO RSS

-
-
-
[Desktop Entry]
-Type=Application
-Name=RSS feed addition
-Exec=/usr/bin/env rssadd %U
-
-
-
-
-
-

Qutebrowser

-
-
-
[Desktop Entry]
-Name=qutebrowser
-GenericName=Web Browser
-Comment=A keyboard-driven, vim-like browser based on PyQt5
-Icon=qutebrowser
-Type=Application
-Categories=Network;WebBrowser;
-Exec=qutebrowser %u
-Terminal=false
-StartupNotify=false
-MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/qute;
-Keywords=Browser
-Actions=new-window;preferences;
-
-
-
-

Org-Protocol

@@ -499,10 +410,26 @@ for the JavaScript code in this tag.
+
+

Emacs Client

+
+
+
[Desktop Entry]
+Name=Emacs Client
+Exec=emacsclient -c %u
+Icon=emacs-icon
+Type=Application
+Terminal=false
+MimeType=x-scheme-handler/org-protocol;
+NoDisplay=true
+
+
+
+

Author: Dehaeze Thomas

-

Created: 2020-01-12 dim. 17:28

+

Created: 2020-03-01 dim. 22:50

diff --git a/docs/bash.html b/docs/bash.html index 2edbf16..eb29b89 100644 --- a/docs/bash.html +++ b/docs/bash.html @@ -4,7 +4,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Bash Configuration @@ -201,50 +201,28 @@ @@ -260,32 +238,30 @@ for the JavaScript code in this tag.
-
(setq org-noter-always-create-frame nil)
-(setq org-noter-kill-frame-at-session-end nil)
-;; Fraction of the frame that the document window will occupy when split
-(setq org-noter-doc-split-fraction '(0.6 . 0.6))
-;; Save the last visited location automatically; when starting a new session, go to that location
-(setq org-noter-auto-save-last-location t)
-;; Add an empty line between each note's heading and content
-(setq org-noter-separate-notes-from-heading t)
-;; List of paths to check (non recursively) when searching for a notes file
-(setq org-noter-notes-search-path "~/Cloud/thesis/ressources/notes")
+
(use-package! org-noter
+  :after org
+  :init
+  :config
+  (setq org-noter-always-create-frame nil)
+  (setq org-noter-kill-frame-at-session-end nil)
+  ;; Fraction of the frame that the document window will occupy when split
+  (setq org-noter-doc-split-fraction '(0.6 . 0.6))
+  ;; Save the last visited location automatically; when starting a new session, go to that location
+  (setq org-noter-auto-save-last-location t)
+  ;; Add an empty line between each note's heading and content
+  (setq org-noter-separate-notes-from-heading t)
+  ;; List of paths to check (non recursively) when searching for a notes file
+  (setq org-noter-notes-search-path "~/Cloud/thesis/ressources/notes")
+)
 
@@ -2133,79 +2376,223 @@ Ressources:

Custom key bindings

-

-Export to LaTeX -

+
+
+

Insert Link to paper / notes

+
-
(map! :map org-mode-map :n ",l" 'org-latex-export-to-latex)
+
(defun tdh-insert-paper-org-link (paper)
+  "Insert an org link to some paper, choosing the file with completion"
+  (interactive
+   (list (read-file-name "Paper: " "~/Cloud/thesis/ressources/pdfs/" nil t)))
+  (insert (format "[[papers:%s]]" (file-name-base paper))))
+
+(after! org
+  (map! :map org-mode-map :n ",ip" 'tdh-insert-paper-org-link))
 
-

-Open pdf externally. -

-
(defun tdh/open-org-pdf-externally ()
+
(defun tdh-insert-note-org-link (note)
+  "Insert an org link to some note, choosing the file with completion"
+  (interactive
+   (list (read-file-name "Note: " "~/Cloud/thesis/ressources/pdfs/" nil t)))
+  (insert (format "[[notes:%s]]" (file-name-base note))))
+
+(after! org
+  (map! :map org-mode-map :n ",in" 'tdh-insert-note-org-link))
+
+
+
+
+ +
+

Insert Image that is in the figs folder

+
+
+
(defun tdh-insert-image-org-link (img)
+  "Insert an org image link, choosing the file with completion
+and starting from `my-default-image-directory'."
+  (interactive
+   (list (file-relative-name (read-file-name "Image: " (concat default-directory "figs/")) default-directory)))
+  (insert (format "[[file:%s]]" img)))
+
+(after! org
+  (map! :map org-mode-map :n ",if" 'tdh-insert-image-org-link))
+
+
+
+
+ +
+

Watch LaTeX file using latexmk

+
+
+
(defun tdh-latex/watch ()
+  "Watch LaTeX file using latexmk"
+  (interactive)
+  (start-process-shell-command "latexmk-watch" "*latexmk-watch-output*"
+                               "latexmk" (format "-pdflatex=\"xelatex -synctex=1 -shell-escape -interaction nonstopmode  -output-directory='%s'\" -pdf -pvc -bibtex -f %s.tex"
+                                                 (file-name-directory buffer-file-name)
+                                                 (file-name-base buffer-file-name))))
+(defun tdh-latex/watch/kill ()
+  "Kill the currently running TeX job."
+  (interactive)
+  (delete-process "latexmk-watch")
+  )
+
+(after! org
+  (map! :map org-mode-map
+          :n ",ow" 'tdh-latex/watch
+          :n ",ok" 'tdh-latex/watch/kill))
+
+
+
+
+ +
+

Helm-Bibtex

+
+
+
(after! org
+  (map! :map org-mode-map
+          :n ",ob" 'helm-bibtex
+          :n ",of" 'helm-bibtex-favorites
+          :n ",or" 'helm-resume))
+
+
+
+
+ +
+

Open terminal in current directory

+
+
+
(defun tdh-open-terminal-in-workdir ()
+  (interactive)
+  (call-process-shell-command
+  (concat "termite --directory=" default-directory) nil 0))
+
+(after! org
+  (map! :map org-mode-map :n ",ot" 'tdh-open-terminal-in-workdir))
+
+
+
+
+ +
+

Open ranger in current directory

+
+
+
(defun tdh-open-ranger-in-workdir ()
+  (interactive)
+  (call-process-shell-command
+  (concat "termite --directory=" default-directory " --exec=ranger") nil 0))
+
+(after! org
+  (map! :map org-mode-map :n ",oo" 'tdh-open-ranger-in-workdir))
+
+
+
+
+ +
+

Export to LaTeX

+
+
+
(after! org
+  (map! :map org-mode-map :n ",l" 'org-latex-export-to-latex))
+
+
+
+
+ +
+

Open pdf externally.

+
+
+
(defun tdh-open-org-pdf-externally ()
   (interactive)
   (call-process "xdg-open" nil 0 nil (concat (file-name-sans-extension (buffer-file-name)) ".pdf"))
   )
 
-(map! :map org-mode-map :n ",vp" 'tdh/open-org-pdf-externally)
+(after! org
+  (map! :map org-mode-map :n ",vp" 'tdh-open-org-pdf-externally))
 
+
+
-

-Open HTML externally. +

+

Open HTML externally.

+
+
+
(defun tdh-open-org-html-externally ()
+    (interactive)
+    (call-process "xdg-open" nil 0 nil (concat (file-name-sans-extension (buffer-file-name)) ".html"))
+    )
+
+(after! org
+  (map! :map org-mode-map :n ",vh" 'tdh-open-org-html-externally))
+
+
+
+
+ +
+

Take Screenshot and insert a link

+
+
    +
  • Ask for a name screenshot_name
  • +
  • use maim -s figs/screenshot_name.png to take a screenshot with selection
  • +
  • +Then insert the following to the buffer

    -
    (defun tdh/open-org-html-externally ()
    +
    #+name: sreenshot_name
    +[[file:figs/screenshot_name.png]]
    +
    +
  • +
+ +

+Then it would be nice to automatically prefix the CUSTOM_ID property (until the first _). +

+ +
+
(defun tdh-insert-screenshot-org-link ()
+"Capture screenshot and insert the resulting file.
+The screenshot tool is determined by `org-download-screenshot-method'."
   (interactive)
-  (call-process "xdg-open" nil 0 nil (concat (file-name-sans-extension (buffer-file-name)) ".html"))
+  (defvar filename (concat "./figs/" (read-string "Enter file name:") ".png"))
+  (shell-command (concat "maim -s " filename))
+  (insert (format "[[file:%s]]" filename))
   )
 
-(map! :map org-mode-map :n ",vh" 'tdh/open-org-html-externally)
+(after! org
+  (map! :map org-mode-map :n ",is" 'tdh-insert-screenshot-org-link))
 
- -
-

TODO Org-Contacts

-
-
-
(setq org-contacts-files (list "~/Cloud/org/contacts.org"))
-
-
-
-
- -
-

TODO Org-Wunderlist

-
-
-
(setq org-wunderlist-client-id "6799d9caeb2f5d8bd641"
-      org-wunderlist-token "fd5965cde436c2587850a7c517d366561d8a1cbf7b6d96ab62f3fc8c9930"
-      org-wunderlist-file "~/Cloud/thesis/todos/wunderlist.org"
-      org-wunderlist-dir "~/.emacs.d/org-wunderlist/")
-
-
-

Automatically run startblock when opening org-mode files

-
(defun tdh/eval-startblock ()
-  (if (member "startblock" (org-babel-src-block-names))
-    (save-excursion
-      (org-babel-goto-named-src-block "startblock")
-      (org-babel-execute-src-block))
-    nil
-    )
-  )
+
(after! org
+  (defun tdh-eval-startblock ()
+      (if (member "startblock" (org-babel-src-block-names))
+      (save-excursion
+          (org-babel-goto-named-src-block "startblock")
+          (org-babel-execute-src-block))
+      nil
+      )
+      )
 
-(add-hook 'org-mode-hook 'tdh/eval-startblock)
+  (add-hook 'org-mode-hook 'tdh-eval-startblock)
+)
 
@@ -2230,18 +2617,18 @@ Open HTML externally. (require 's) ;; start directory -(defvar tdh/image-dir (expand-file-name "/home/thomas/Pictures")) +(defvar tdh-image-dir (expand-file-name "/home/thomas/Pictures")) -(defun tdh/insert-conference-image () +(defun tdh-insert-conference-image () "Insert image from conference directory, rename and add link in current file. -The file is taken from a start directory set by `tdh/image-dir' and moved to the current directory, renamed and embedded at the point as an org-mode link. The user is presented with a list of files in the start directory, from which to select the file to move, sorted by most recent first." +The file is taken from a start directory set by `tdh-image-dir' and moved to the current directory, renamed and embedded at the point as an org-mode link. The user is presented with a list of files in the start directory, from which to select the file to move, sorted by most recent first." (interactive) (let (file-list target-dir file-list-sorted start-file start-file-full file-ext end-file end-file-base end-file-full file-number) ;; Clean directories from list but keep times (setq file-list (-remove (lambda (x) (nth 1 x)) - (directory-files-and-attributes tdh/image-dir))) + (directory-files-and-attributes tdh-image-dir))) ;; Get target directory (setq target-dir (file-name-directory (buffer-file-name))) @@ -2262,7 +2649,7 @@ Open HTML externally. ;; add full path to start file and end-file (setq start-file-full - (expand-file-name start-file tdh/image-dir)) + (expand-file-name start-file tdh-image-dir)) ;; final file name including path (setq end-file-full @@ -2290,56 +2677,68 @@ Open HTML externally.

-
(defun my-render-org-table-at-point ()
-  (interactive)
-  (save-excursion
-    (beginning-of-line)
-    ;; removes the overlay is already there
-    (if (overlays-at (point))
-        (delete-overlay (car (overlays-at (point))))
+
(after! org
+  (defun tdh-render-org-table-at-point ()
+      (interactive)
+      (save-excursion
+      (beginning-of-line)
+      ;; removes the overlay is already there
+      (if (overlays-at (point))
+          (delete-overlay (car (overlays-at (point))))
 
-      (let* ((element-type (org-element-type (org-element-at-point))))
-        (if (and (not (eq element-type 'table))
-                 (not (eq element-type 'table-row)))
-            (error "not at an org table")
+          (let* ((element-type (org-element-type (org-element-at-point))))
+          (if (and (not (eq element-type 'table))
+                  (not (eq element-type 'table-row)))
+              (error "not at an org table")
 
-          (while (not (eq 'table (org-element-type (org-element-at-point))))
-            (forward-line -1))
-          (my-render-org-table (org-element-at-point))
-          )))))
+              (while (not (eq 'table (org-element-type (org-element-at-point))))
+              (forward-line -1))
+              (tdh-render-org-table (org-element-at-point))
+              )))))
 
 
-(defun my-render-org-table (table)
-  (interactive)
-  (let* ((begin (org-element-property :begin table))
-         (end (let ((pos (org-element-property :end table)))
-                (goto-char pos)
-                (beginning-of-line)
-                ;; skip possible space after table
-                (while (not (looking-at " *[|#]"))
-                  (setq pos (point))
-                  (forward-line -1))
-                pos))
-         (tabletxt (buffer-substring-no-properties begin end))
-         (img (with-temp-buffer
-                (insert tabletxt)
-                (mark-whole-buffer)
-                (org-latex-convert-region-to-latex)
-                (org-latex-preview)
-                (goto-char (point-min))
-                (overlay-get  (car (overlays-at (point))) 'display)))
-         (overlay (make-overlay begin end)))
-    (overlay-put overlay 'display img)
-    (forward-line -1))
-    )
+  (defun tdh-render-org-table (table)
+      (interactive)
+      (let* ((begin (org-element-property :begin table))
+          (end (let ((pos (org-element-property :end table)))
+                  (goto-char pos)
+                  (beginning-of-line)
+                  ;; skip possible space after table
+                  (while (not (looking-at " *[|#]"))
+                      (setq pos (point))
+                      (forward-line -1))
+                  pos))
+          (tabletxt (buffer-substring-no-properties begin end))
+          (img (with-temp-buffer
+                  (insert tabletxt)
+                  (mark-whole-buffer)
+                  (org-latex-convert-region-to-latex)
+                  (org-latex-preview)
+                  (goto-char (point-min))
+                  (overlay-get  (car (overlays-at (point))) 'display)))
+          (overlay (make-overlay begin end)))
+      (overlay-put overlay 'display img)
+      (forward-line -1))
+      )
 
 
-(defun my-render-org-tables-in-buffer ()
-  (save-excursion
-    (org-element-map (org-element-parse-buffer) 'table 'my-render-org-table)))
+  (defun tdh-render-org-tables-in-buffer ()
+      (save-excursion
+      (org-element-map (org-element-parse-buffer) 'table 'tdh-render-org-table)))
 
   ;; Use F9 to globally generate tables
-  (map! :map org-mode-map :n "<f8>" (lambda () (interactive) (my-render-org-table-at-point)))
+  (map! :map org-mode-map :n "<f8>" (lambda () (interactive) (tdh-render-org-table-at-point)))
+)
+
+
+
+
+ +
+

Org Download

+
+
+
 
@@ -2353,12 +2752,17 @@ Open HTML externally.
-
(setq org-gcal-client-id "396102378658-dcmbcmrnthbe925519otsjbd921otq0v.apps.googleusercontent.com"
-      org-gcal-client-secret "4M5PWrbhQjwYEMXGK85lDYX9"
-      org-gcal-file-alist '(("dehaeze.thomas@gmail.com" . "~/Cloud/org/gcal.org")
-                            ("8kjmhe2ar0abnm054ill1fb0gc@group.calendar.google.com" . "~/Cloud/org/gcal_phd.org")))
-;; Automatic fetch of the new events
-(add-hook 'org-agenda-mode-hook (lambda () (org-gcal-fetch) ))
+
(use-package! org-gcal
+  :after org
+  :init
+  :config
+  (setq org-gcal-client-id "396102378658-dcmbcmrnthbe925519otsjbd921otq0v.apps.googleusercontent.com"
+        org-gcal-client-secret "4M5PWrbhQjwYEMXGK85lDYX9"
+        org-gcal-file-alist '(("dehaeze.thomas@gmail.com" . "~/Cloud/org/gcal.org")
+                              ("8kjmhe2ar0abnm054ill1fb0gc@group.calendar.google.com" . "~/Cloud/org/gcal_phd.org")))
+  ;; Automatic fetch of the new events
+  ;; (add-hook 'org-agenda-mode-hook (lambda () (org-gcal-fetch) ))
+)
 
@@ -2372,22 +2776,64 @@ Open HTML externally.

Main configuration

+

+Don’t ask for confirmation when evaluating following blocs +

-
;; Don't ask for confirmation when evalutating latex blocs
-(defun my-org-confirm-babel-evaluate (lang body)
-  (not (member lang '("emacs-lisp" "latex" "matlab" "sh"))))
-(setq org-confirm-babel-evaluate 'my-org-confirm-babel-evaluate)
+
(defun tdh-org-confirm-babel-evaluate (lang body)
+    (not (member lang '("emacs-lisp" "latex" "matlab" "sh"))))
+
+(after! org
+  (setq org-confirm-babel-evaluate 'tdh-org-confirm-babel-evaluate))
 
+

+Use the current window for C-c ’ source editing +

-
;; Use the current window for C-c ' source editing
-(setq org-src-window-setup 'current-window)
+
(after! org
+  (setq org-src-window-setup 'current-window))
 
+
+

Appearance of source blocks

+
+
+
(defun tdh-org-prettify-symbols ()
+  (mapc (apply-partially 'add-to-list 'prettify-symbols-alist)
+        (cl-reduce 'append
+                   (mapcar (lambda (x) (list x (cons (upcase (car x)) (cdr x))))
+                           `(("#+begin_src" . ?✎)
+                             ("#+end_src"   . ?□)
+                             ("#+begin_quote" . ?»)
+                             ("#+end_quote" . ?«)))))
+  (turn-on-prettify-symbols-mode))
+(add-hook 'org-mode-hook #'tdh-org-prettify-symbols)
+
+
+
+
+ +
+

Library of Babel

+
+

+Add all named source blocks to org-babel-library-of-babel. +

+ +
+
(after! org
+  (org-babel-lob-ingest "~/Cloud/thesis/org-mode/org-babel-tutorial/org-babel-library.org"))
+
+
+
+
+ +

Special Shortcuts

@@ -2401,29 +2847,42 @@ when inside a source block. Otherwise, keep the normal behavior for ctrl-ent.

-
(defun tdh/ctrl-ret ()
-  (interactive)
-  (defun in-src-block-p ()
-    "Returns t when the point is inside a source code block"
-    (string= "src" (org-in-block-p '("src"))))
+
(defun tdh-ctrl-ret ()
+    (interactive)
+    (defun in-src-block-p ()
+      "Returns t when the point is inside a source code block"
+      (string= "src" (org-in-block-p '("src"))))
 
-  (defun in-src-block-function ()
-    "Function to do when inside the src block"
-     (progn
-      (org-babel-execute-src-block)
-      (org-babel-next-src-block)))
+    (defun in-src-block-function ()
+      "Function to do when inside the src block"
+      (progn
+          (org-babel-execute-src-block)
+          (org-babel-next-src-block)))
 
-  (if (in-src-block-p)
-      (in-src-block-function)
-    (+org--insert-item 'below)))
+    (if (in-src-block-p)
+        (in-src-block-function)
+        (+org--insert-item 'below)))
 
- (map! :map evil-org-mode-map
-       :n "<C-return>" #'tdh/ctrl-ret)
+(map! :after evil-org
+      :map evil-org-mode-map
+      :n "<C-return>" #'tdh-ctrl-ret)
 
-
;; (evil-define-minor-mode-key 'normal 'org-src-mode "q" 'org-edit-src-exit)
+
(defun tdh-ctrl-shit-ret ()
+    (interactive)
+    (defun in-src-block-p ()
+    "Returns t when the point is inside a source code block"
+    (string= "src" (org-in-block-p '("src"))))
+
+    (if (in-src-block-p)
+        (tdh-org-babel-execute-goto-next)
+    (+org/insert-item-above)))
+
+(map! :after evil-org
+      :map evil-org-mode-map
+      :n "<C-S-return>" #'tdh-ctrl-shit-ret)
 
@@ -2431,38 +2890,6 @@ when inside a source block. Otherwise, keep the normal behavior for ctrl-ent. Remap C-c C-c: https://emacs.stackexchange.com/questions/22430/rebind-org-babel-execute-src-block-maybe-to-c-c-c-c/22530#22530

- -
-
(defun tdh/ctrl-shit-ret ()
-  (interactive)
-  (defun in-src-block-p ()
-    "Returns t when the point is inside a source code block"
-    (string= "src" (org-in-block-p '("src"))))
-
-  (if (in-src-block-p)
-      (tdh/org-babel-execute-goto-next)
-    (+org/insert-item-above)))
-
- (map! :map evil-org-mode-map
-       :n "<C-S-return>" #'tdh/ctrl-shit-ret)
-
-
-
-
- -
-

Library of Babel

-
-

-Add all named source blocks to org-babel-library-of-babel. -

- -
-
(after! org-babel
-  (org-babel-lob-ingest "~/Cloud/thesis/org-mode/org-babel-tutorial/org-babel-library.org")
-  )
-
-
@@ -2470,20 +2897,22 @@ Add all named source blocks to org-babel-library-of-babel.

Org-Babel Matlab

-
(setq org-babel-matlab-shell-command "/home/thomas/bin/matlab -nodesktop -nosplash")
+
(after! org
+  (setq org-babel-matlab-shell-command "/home/thomas/bin/matlab -nodesktop -nosplash")
 
-(setq org-babel-matlab-emacs-link-wrapper-method
-  "%s
-  if ischar(ans);
-    echo('test');
-    fid = fopen('%s', 'w');
-    fprintf(fid, '%s', ans);
-    fclose(fid);
-  else;
-    save -ascii %s ans;
-  end
-  delete('%s');
-  ")
+  (setq org-babel-matlab-emacs-link-wrapper-method
+      "%s
+      if ischar(ans);
+      echo('test');
+      fid = fopen('%s', 'w');
+      fprintf(fid, '%s', ans);
+      fclose(fid);
+      else;
+      save -ascii %s ans;
+      end
+      delete('%s');
+      ")
+  )
 
@@ -2493,40 +2922,19 @@ Add all named source blocks to org-babel-library-of-babel.

Default options for Matlab code

-
(setq org-babel-default-header-args:matlab
-      '((:results . "none")
-        (:session . "*MATLAB*")
-        (:comments . "org")
-        (:exports . "both")
-        (:cache .   "no")
-        (:noweb . "no")
-        (:hlines . "no")
-        (:tangle . "no")
-        (:mkdir . "yes")
-        (:eval . "no-export")))
-
-
-
- - -
-

TODO Asynchronous execution

-
-
-
;; (push "~/.emacs.d/private/ob-session-async/lisp/" load-path)
-;; (require 'ob-session-async)
-
-
- -
-
;; (with-eval-after-load "ob"
-;;   (require 'org-babel-eval-in-repl))
-
-
- -
-
;; (with-eval-after-load "eval-in-repl"
-;;   (setq eir-jump-after-eval nil))
+
(after! org
+  (setq org-babel-default-header-args:matlab
+          '((:results . "none")
+          (:session . "*MATLAB*")
+          (:comments . "org")
+          (:exports . "both")
+          (:cache .   "no")
+          (:noweb . "no")
+          (:hlines . "no")
+          (:tangle . "no")
+          (:mkdir . "yes")
+          (:eval . "no-export")))
+  )
 
@@ -2549,9 +2957,11 @@ Add all named source blocks to org-babel-library-of-babel.

Indentation

-
(setq org-edit-src-content-indentation 2
-      org-src-tab-acts-natively nil
-      org-src-preserve-indentation nil)
+
(after! org
+  (setq org-edit-src-content-indentation 2
+        org-src-tab-acts-natively nil
+        org-src-preserve-indentation nil)
+  )
 
@@ -2565,7 +2975,7 @@ Add all named source blocks to org-babel-library-of-babel.

whos matlab function

-
(defun tdh/matlab-whos (&optional start end)
+
(defun tdh-matlab-whos (&optional start end)
 "Get what is in the Matlab workspace"
   (interactive)
   (if (use-region-p)
@@ -2581,7 +2991,7 @@ Add all named source blocks to org-babel-library-of-babel.
 

help matlab function

-
(defun tdh/matlab-help (start end)
+
(defun tdh-matlab-help (start end)
 "Get help on the selected function"
   (interactive "r")
   (let ((regionp (buffer-substring start end)))
@@ -2595,7 +3005,7 @@ Add all named source blocks to org-babel-library-of-babel.
 

Execute selected text

-
(defun tdh/matlab-execute-selected (start end)
+
(defun tdh-matlab-execute-selected (start end)
 "Execute selected text in the *MATLAB* buffer"
   (interactive "r")
   (let ((regionp (buffer-substring start end)))
@@ -2609,7 +3019,7 @@ Add all named source blocks to org-babel-library-of-babel.
 

Specify a Matlab command to run

-
(defun tdh/matlab-run-command ()
+
(defun tdh-matlab-run-command ()
   "Prompt user to enter a matlab command"
   (interactive)
   (process-send-string "*MATLAB*" (concat (read-string "Matlab Command: ") "\n")))
@@ -2622,7 +3032,7 @@ Add all named source blocks to org-babel-library-of-babel.
 

Execute the current source block with no output

-
(defun tdh/org-babel-execute (&optional arg info params)
+
(defun tdh-org-babel-execute (&optional arg info params)
   (interactive)
   (let* ((org-babel-current-src-block-location
       (or org-babel-current-src-block-location
@@ -2691,9 +3101,9 @@ Add all named source blocks to org-babel-library-of-babel.
 

Execute the source block and go to the next one

-
(defun tdh/org-babel-execute-goto-next (&optional arg info params)
+
(defun tdh-org-babel-execute-goto-next (&optional arg info params)
   (interactive)
-  (tdh/org-babel-execute arg info params)
+  (tdh-org-babel-execute arg info params)
   (org-babel-next-src-block)
   )
 
@@ -2705,7 +3115,7 @@ Add all named source blocks to org-babel-library-of-babel.

Org-Babel Tangle Subtree

-
(defun tdh/org-babel-tangle-subtree ()
+
(defun tdh-org-babel-tangle-subtree ()
   "Tangle the current subtree"
   (interactive)
   (progn
@@ -2713,11 +3123,9 @@ Add all named source blocks to org-babel-library-of-babel.
     (org-babel-tangle)
     (widen))
   )
-
-
-
-
(map! :map org-mode-map :n ",bT" 'tdh/org-babel-tangle-subtree)
+(after! org
+  (map! :map org-mode-map :n ",bT" 'tdh-org-babel-tangle-subtree))
 
@@ -2731,7 +3139,7 @@ Actually this tangle the file and then go to the file. Maybe I would like to ign

-
(defun tdh/org-babel-jump-to-tangle-file ()
+
(defun tdh-org-babel-jump-to-tangle-file ()
   "Jump to tangle file for the source block at point."
   (interactive)
   (let (file org-babel-pre-tangle-hook org-babel-post-tangle-hook)
@@ -2744,11 +3152,9 @@ Actually this tangle the file and then go to the file. Maybe I would like to ign
       (if (file-readable-p file)
       (find-file file)
     (error "Cannot open tangle file %S" file)))))
-
-
-
-
(map! :map org-mode-map :n ",bF" 'tdh/org-babel-jump-to-tangle-file)
+  (after! org
+    (map! :map org-mode-map :n ",bF" 'tdh-org-babel-jump-to-tangle-file))
 
@@ -2758,7 +3164,7 @@ Actually this tangle the file and then go to the file. Maybe I would like to ign

Org-Babel Tangle File and Execute

-
(defun tdh/org-babel-execute-tangle-file ()
+
(defun tdh-org-babel-execute-tangle-file ()
   "Jump to tangle file for the source block at point."
   (interactive)
   (let (file org-babel-pre-tangle-hook org-babel-post-tangle-hook)
@@ -2778,9 +3184,9 @@ Actually this tangle the file and then go to the file. Maybe I would like to ign
 
-
-

LaTeX

-
+ -
-

Pdf Viewer

-
+
+

PDF Viewer

+
(setq TeX-view-program-selection '((output-pdf "Zathura")))
 (setq TeX-source-correlate-mode t)
@@ -2833,81 +3239,125 @@ Actually this tangle the file and then go to the file. Maybe I would like to ign
 
+ +
+

Bibtex

+
+
+
(use-package! bibtex
+  :config
+  (bibtex-set-dialect 'BibTeX))
+
+
+
+
-
-

Helm-Bibtex

-
+
+

Helm-Bibtex

+

General Config

-
;; Use "tags" field when looking for bib entries
-(setq helm-bibtex-additional-search-fields '(tags))
+
(use-package! helm-bibtex
+  :init
+  :config
+  ;; Bibliography file
+  (setq bibtex-completion-bibliography "~/Cloud/thesis/ressources/references.bib")
 
-;; Display of bibtex entries with helm
-(setq bibtex-completion-display-formats
-      '((t . "${author:36} ${title:*} ${year:4} ${=type=:7} ${=has-note=:1}")))
+  ;; Directory with all the pdfs
+  (setq bibtex-completion-library-path "~/Cloud/thesis/ressources/pdfs")
 
-;; Special symbols for notes and pdf
-(setq bibtex-completion-pdf-symbol "⌘")
-(setq bibtex-completion-notes-symbol "✎")
+  ;; Directory with notes files
+  (setq bibtex-completion-notes-path "~/Cloud/thesis/ressources/notes/notes.org")
 
-;; Bibliography file
-(setq bibtex-completion-bibliography "~/Cloud/thesis/ressources/references.bib")
+  (setq bibtex-completion-notes-extension ".org")
 
-;; Directory with all the pdfs
-(setq bibtex-completion-library-path "~/Cloud/thesis/ressources/pdfs")
+  (setq bibtex-completion-pdf-extension '(".pdf" ".djvu"))
 
-;; Directory with notes files
-(setq bibtex-completion-notes-path "~/Cloud/thesis/ressources/notes")
+  ;; Use "tags" field when looking for bib entries
+  (setq helm-bibtex-additional-search-fields '(tags))
 
-;; Template used when creating new Note file
-(setq bibtex-completion-notes-template-multiple-files (concat "#+TITLE: ${title}\n"
-                                                              ":DRAWER:\n"
-                                                              "#+LATEX_CLASS: biblioreport\n"
-                                                              "\n"
-                                                              "#+OPTIONS: toc:nil title:nil\n"
-                                                              "#+OPTIONS: ':t -:t\n"
-                                                              "\n"
-                                                              "#+LATEX_HEADER: \\newcommand{\\refType}{${=type=}}\n"
-                                                              "#+LATEX_HEADER: \\newcommand{\\refKey}{${=key=}}\n"
-                                                              "#+LATEX_HEADER: \\newcommand{\\refTitle}{${title}}\n"
-                                                              "#+LATEX_HEADER: \\newcommand{\\refAuthor}{${author-or-editor}}\n"
-                                                              "#+LATEX_HEADER: \\newcommand{\\refJournal}{${journal}}\n"
-                                                              "#+LATEX_HEADER: \\newcommand{\\refYear}{${year}}\n"
-                                                              "#+LATEX_HEADER: \\newcommand{\\refDoi}{${DOI}}\n"
-                                                              "#+LATEX_HEADER: \\newcommand{\\refUrl}{${url}}\n"
-                                                              "#+LATEX_HEADER: \\newcommand{\\refKeywords}{${tags}}\n"
-                                                              "#+LATEX_HEADER: \\input{config.tex}\n"
-                                                              "#+LATEX_HEADER: \\graphicspath{{./figs/${=key=}/}}\n"
-                                                              "# #+TOC: headlines 2\n"
-                                                              ":END:\n"
-                                                              "\n"
-                                                              "#+BEGIN_abstract\n"
-                                                              "\n"
-                                                              "#+END_abstract\n"
-                                                              "\n"
-                                                              "* ${title} :ignore:\n"
-                                                              ":PROPERTIES:\n"
-                                                              ":CUSTOM_ID: ${=key=}\n"
-                                                              ":AUTHOR:    ${author}\n"
-                                                              ":TYPE:      ${=type=}\n"
-                                                              ":JOURNAL:   ${journal}\n"
-                                                              ":YEAR:      ${year}\n"
-                                                              ":VOLUME:    ${volume}\n"
-                                                              ":PAGES:     ${pages}\n"
-                                                              ":DOI:       ${DOI}\n"
-                                                              ":URL:       ${url}\n"
-                                                              ":NOTER_DOCUMENT: ../pdfs/${=key=}.pdf\n"
-                                                              ":END:\n"
-                                                              "\n"))
+  (setq helm-bibtex-full-frame nil)
 
-;; Make "Edit notes" the default action
-(after! helm-bibtex
+  (setq org-noter-auto-save-last-location nil)
+
+  ;; Display of bibtex entries with helm
+  (setq bibtex-completion-display-formats
+          '((t . "${author:36} ${title:*} ${year:4} ${=type=:7} ${=has-note=:1}")))
+
+  ;; Special symbols for notes and pdf
+  (setq bibtex-completion-pdf-symbol "⌘")
+  (setq bibtex-completion-notes-symbol "✎")
+
+  ;; Template used when creating new Note file
+  (setq bibtex-completion-notes-template-multiple-files (concat "#+TITLE: ${title}\n"
+    ":DRAWER:\n"
+    "#+LATEX_CLASS: biblioreport\n"
+    "\n"
+    "#+OPTIONS: toc:nil title:nil\n"
+    "#+OPTIONS: ':t -:t\n"
+    "\n"
+    "#+LATEX_HEADER: \\newcommand{\\refType}{${=type=}}\n"
+    "#+LATEX_HEADER: \\newcommand{\\refKey}{${=key=}}\n"
+    "#+LATEX_HEADER: \\newcommand{\\refTitle}{${title}}\n"
+    "#+LATEX_HEADER: \\newcommand{\\refAuthor}{${author-or-editor}}\n"
+    "#+LATEX_HEADER: \\newcommand{\\refJournal}{${journal}}\n"
+    "#+LATEX_HEADER: \\newcommand{\\refYear}{${year}}\n"
+    "#+LATEX_HEADER: \\newcommand{\\refDoi}{${DOI}}\n"
+    "#+LATEX_HEADER: \\newcommand{\\refUrl}{${url}}\n"
+    "#+LATEX_HEADER: \\newcommand{\\refKeywords}{${tags}}\n"
+    "#+LATEX_HEADER: \\input{config.tex}\n"
+    "#+LATEX_HEADER: \\graphicspath{{./figs/${=key=}/}}\n"
+    "# #+TOC: headlines 2\n"
+    ":END:\n"
+    "\n"
+    "#+BEGIN_abstract\n"
+    "\n"
+    "#+END_abstract\n"
+    "\n"
+    "* ${title} :${=type=}:ignore:\n"
+    ":PROPERTIES:\n"
+    ":CUSTOM_ID: ${=key=}\n"
+    ":AUTHOR:    ${author}\n"
+    ":TYPE:      ${=type=}\n"
+    ":JOURNAL:   ${journal}\n"
+    ":YEAR:      ${year}\n"
+    ":VOLUME:    ${volume}\n"
+    ":PAGES:     ${pages}\n"
+    ":DOI:       ${DOI}\n"
+    ":URL:       ${url}\n"
+    ":NOTER_DOCUMENT: ../pdfs/${=key=}.pdf\n"
+    ":END:\n"
+    "\n"))
+
+  (setq bibtex-completion-notes-template-one-file (concat "\n"
+    "* ${author-abbrev} (${year}): ${title} :${=type=}:ignore:\n"
+    ":PROPERTIES:\n"
+    ":CUSTOM_ID: ${=key=}\n"
+    ":EXPORT_FILE_NAME: ${=key=}\n"
+    ":EXPORT_TITLE: ${title}\n"
+    ":AUTHOR:    ${author}\n"
+    ":TYPE:      ${=type=}\n"
+    ":JOURNAL:   ${journal}\n"
+    ":YEAR:      ${year}\n"
+    ":VOLUME:    ${volume}\n"
+    ":PAGES:     ${pages}\n"
+    ":DOI:       ${DOI}\n"
+    ":URL:       ${url}\n"
+    ":NOTER_DOCUMENT: ../pdfs/${=key=}.pdf\n"
+    ":END:\n"
+    "\n"))
+
+  ;; Make "Edit notes" the default action
   (helm-delete-action-from-source "Edit notes" helm-source-bibtex)
-  (helm-add-action-to-source "Edit notes" 'helm-bibtex-edit-notes helm-source-bibtex 0))
+  (helm-add-action-to-source "Edit notes" 'helm-bibtex-edit-notes helm-source-bibtex 0)
+
+  (helm-delete-action-from-source "Open PDF Externally" helm-source-bibtex)
+  (helm-add-action-to-source "Open PDF Externally" 'tdehaeze/open-pdf-externally helm-source-bibtex 1)
+)
 
@@ -2917,13 +3367,9 @@ Actually this tangle the file and then go to the file. Maybe I would like to ign

Open pdf externally

-
(defun tdehaeze/open-pdf-externally (key)
+
;; Action to open the pdf with Zathura
+(defun tdehaeze/open-pdf-externally (key)
   (call-process "zathura" nil 0 nil (nth 0 (-cons-to-list (bibtex-completion-find-pdf key)))))
-
-;; Action to open the pdf with Zathura
-(after! helm-bibtex
-  (helm-delete-action-from-source "Open PDF Externally" helm-source-bibtex)
-  (helm-add-action-to-source "Open PDF Externally" 'tdehaeze/open-pdf-externally helm-source-bibtex 1))
 
@@ -2970,9 +3416,9 @@ Actually this tangle the file and then go to the file. Maybe I would like to ign
-
-

TODO Matlab

-
+
+

TODO Matlab

+
@@ -3031,6 +3477,16 @@ Actually this tangle the file and then go to the file. Maybe I would like to ign
+
+

Completion in the Matlab Shell

+
+
+
(map! :map matlab-shell-mode-map :i "<tab>" 'matlab-shell-tab)
+
+
+
+
+

TODO Beautify code

@@ -3069,7 +3525,7 @@ Actually this tangle the file and then go to the file. Maybe I would like to ign
-
(map! :map matlab-mode-map
+
(map! :map matlab-mode-map
       :n ",g" 'matlab-go-to-file-directory
       :n ",da" 'matlab-add-breakpoint
       :n ",dr" 'matlab-remove-breakpoint
@@ -3088,20 +3544,20 @@ Actually this tangle the file and then go to the file. Maybe I would like to ign
 

Wrong highlight of comments

-
(add-hook 'matlab-mode-hook
-        ;; `highlight-numbers-mode' breaks MATLAB comment coloring --
-        ;; `highlight-numbers-mode' is mostly redundant with
-        ;; `rainbow-identifiers-mode' anyway
-        (lambda ()
-          (highlight-numbers-mode -1))
-        ;; We must append the above *after* `spacemacs/run-prog-mode-hooks'
-        ;; in `matlab-mode-hook', since the former hook enables
-        ;; `highlight-numbers-mode'. Note that
-        ;; `spacemacs/run-prog-mode-hooks' is manually added to
-        ;; `matlab-mode-hook' by Spacemacs since the upstream `matlab-mode'
-        ;; package does not derive `matlab-mode' from `prog-mode' (oddly --
-        ;; IIRC the author refused to do so for compatibility with XEmacs).
-        'append)
+
(add-hook 'matlab-mode-hook
+  ;; `highlight-numbers-mode' breaks MATLAB comment coloring --
+  ;; `highlight-numbers-mode' is mostly redundant with
+  ;; `rainbow-identifiers-mode' anyway
+  (lambda ()
+    (highlight-numbers-mode -1))
+  ;; We must append the above *after* `spacemacs/run-prog-mode-hooks'
+  ;; in `matlab-mode-hook', since the former hook enables
+  ;; `highlight-numbers-mode'. Note that
+  ;; `spacemacs/run-prog-mode-hooks' is manually added to
+  ;; `matlab-mode-hook' by Spacemacs since the upstream `matlab-mode'
+  ;; package does not derive `matlab-mode' from `prog-mode' (oddly --
+  ;; IIRC the author refused to do so for compatibility with XEmacs).
+  'append)
 
@@ -3462,85 +3918,15 @@ Check here.

PDF-Tools

-
(add-hook 'pdf-view-mode-hook (lambda() (linum-mode -1)))
-
-
-
-
- -
-

Custom command and leader keys

-
-
-
-

Watch LaTeX file using latexmk

-
-
-
(defun tdh/latex/watch ()
-  "Watch LaTeX file using latexmk"
-  (interactive)
-  (start-process-shell-command "latexmk-watch" "*latexmk-watch-output*"
-                               "latexmk" (format "-pdflatex=\"xelatex -synctex=1 -shell-escape -interaction nonstopmode  -output-directory='%s'\" -pdf -pvc -bibtex -f %s.tex"
-                                                 (file-name-directory buffer-file-name)
-                                                 (file-name-base buffer-file-name))))
-(defun tdh/latex/watch/kill ()
-  "Kill the currently running TeX job."
-  (interactive)
-  (delete-process "latexmk-watch")
+
(use-package! pdf-tools
+    :config
+    (add-hook 'pdf-view-mode-hook (lambda() (linum-mode -1)))
   )
-
-(map! :map org-mode-map
-      :n ",ow" 'tdh/latex/watch
-      :n ",ok" 'tdh/latex/watch/kill)
 
-
-

Helm-Bibtex

-
-
-
(map! :map org-mode-map
-      :n ",ob" 'helm-bibtex
-      :n ",of" 'helm-bibtex-favorites
-      :n ",or" 'helm-resume)
-
-
-
-
- -
-

Open terminal in current directory

-
-
-
(defun tdh/open-terminal-in-workdir ()
-  (interactive)
-  (call-process-shell-command
-  (concat "termite --directory=" default-directory) nil 0))
-
-(map! :map org-mode-map :n ",ot" 'tdh/open-terminal-in-workdir)
-
-
-
-
- -
-

Open ranger in current directory

-
-
-
(defun tdh/open-ranger-in-workdir ()
-  (interactive)
-  (call-process-shell-command
-  (concat "termite --directory=" default-directory " --exec=ranger") nil 0))
-
-(map! :map org-mode-map :n ",oo" 'tdh/open-ranger-in-workdir)
-
-
-
-
-
-

Yassnippets

@@ -3565,32 +3951,6 @@ Check here.
-
-

TODO Slack

-
-
-
(slack-register-team
-  :name "emacs-slack"
-  :default t
-  :client-id "299050134212.316863429523"
-  :client-secret "7168a660375090e517fe812ea2d136e5"
-  :token "xoxp-299050134212-299063259042-715794254097-7c319fdd63315620e86f1fad42c126a2"
-  :subscribed-channels '())
-
-
- -
-
(advice-add 'slack-counts-update :override #'ignore)
-
-
- -
-
(setq slack-prefer-current-team t)
-
-
-
-
-

TODO Neomutt connection

@@ -3603,7 +3963,7 @@ Check here. ;; Call this function, which spawns neomutt, whenever org-mode ;; tries to open a link of the form mutt:message-id+goes_here@mail.gmail.com -(defun tdh/mutt-open-message (message-id) +(defun tdh-mutt-open-message (message-id) "In neomutt, open the email with the the given Message-ID" (let* ((message-id (replace-regexp-in-string "^/*" "" message-id)) @@ -3625,7 +3985,7 @@ Check here. (concat "neomutt -R -f " mail-dir " -e \"" (format "push '%s a l'\"" mutt-keystrokes))))) ;; Hook up `message:...` style URLs -(org-add-link-type "message" 'tdh/mutt-open-message) +(org-add-link-type "message" 'tdh-mutt-open-message)
@@ -3681,16 +4041,21 @@ they are implemented.
-

Doom init.el

+

Doom init.el   ATTACH

-
(doom! :completion
+
(when noninteractive
+  (after! undo-tree
+    (global-undo-tree-mode -1)))
+
+(doom! :completion
        company           ; the ultimate code completion backend
        helm              ; the *other* search engine for love and life
        ivy               ; a search engine for love and life
 
        :ui
        doom              ; what makes DOOM look the way it does
+       doom-dashboard    ; a nifty splash screen for Emacs
        hl-todo           ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
        hydra
        modeline          ; snazzy, Atom-inspired modeline, plus API
@@ -3722,7 +4087,7 @@ they are implemented.
        eshell            ; a consistent, cross-platform shell (WIP)
 
        :tools
-       debugger          ; FIXME stepping through code, to help you add bugs
+       debugger          ; Stepping through code, to help you add bugs
        (eval +overlay)     ; run code, run (also, repls)
        (lookup           ; helps you navigate your code and documentation
         +docsets)        ; ...or in Dash docsets locally
@@ -3738,12 +4103,13 @@ they are implemented.
        :lang
        data              ; config/data formats
        emacs-lisp        ; drown in parentheses
-       latex             ; writing papers in Emacs has never been so fun
+       latex            ; writing papers in Emacs has never been so fun
        markdown          ; writing docs for people to ignore
        (org              ; organize your plain life in plain text
         +dragndrop       ; drag & drop files/images into org buffers
         +hugo            ; use Emacs for hugo blogging
         +journal         ;
+        +pomodoro        ;
         +present)        ; using org-mode for presentations
        ;;python            ; beautiful is better than ugly
        sh                ; she sells {ba,z,fi}sh shells on the C xor
@@ -3752,7 +4118,7 @@ they are implemented.
        ;;(mu4e +gmail)
 
        :app
-       ;;calendar
+       calendar
        ;;(rss +org)        ; emacs as an RSS reader
        ;;write             ; emacs for writers (fiction, notes, papers, etc.)
 
@@ -3777,6 +4143,8 @@ they are implemented.
 (package! matlab-mode
   :recipe (:host github :repo "matlab-mode/mirror"))
 (package! org-ref)
+(package! org-ql)
+(package! org-fancy-priorities)
 
@@ -3786,9 +4154,9 @@ they are implemented.

Snippets

-
-

LaTeX

-
+
+

LaTeX

+

Coordinate

@@ -3847,9 +4215,9 @@ $0
-
-

Matlab

-
+
+

Matlab

+

Clear

@@ -3907,9 +4275,9 @@ if exist('opts_param','
-
-

Org Mode

-
+
+

Org Mode

+

Begin

@@ -4192,13 +4560,13 @@ $0
#contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
 #name :Matlab-Figure
 # --
-#+HEADER: :tangle no :exports results :results none :noweb yes
+#+header: :tangle no :exports results :results none :noweb yes
 #+begin_src matlab :var filepath="${2:figs}/$1.pdf" :var figsize="${3:full-tall}" :post pdf2svg(file=*this*, ext="png")
   <<plt-matlab>>$0
 #+end_src
 
-#+NAME: fig:$1
-#+CAPTION: ${4:caption}${5: ([[./figs/$1.png][png]], [[./figs/$1.pdf][pdf]])}
+#+name: fig:$1
+#+caption: ${4:caption}${5: ([[./figs/$1.png][png]], [[./figs/$1.pdf][pdf]])}
 [[file:$2/$1.png]]
 
@@ -4510,7 +4878,7 @@ $0

Author: Dehaeze Thomas

-

Created: 2020-01-28 mar. 21:32

+

Created: 2020-03-01 dim. 22:50

diff --git a/docs/i3.html b/docs/i3.html index 491926b..996ecf3 100644 --- a/docs/i3.html +++ b/docs/i3.html @@ -4,7 +4,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + I3 Configuration @@ -201,50 +201,28 @@ @@ -258,14 +236,13 @@ for the JavaScript code in this tag.

Table of Contents

-
-

Basic configuration

-
-
-
-

Colors

-
-
set $bg  #32302f
-set $bg1 #3c3836
-set $bg2 #504945
-set $bg3 #665c54
-set $bg4 #7c6f64
-
-set $fg  #ebdbb2
-set $fg1 #ebdbb2
-set $fg2 #d5c4a1
-set $fg3 #bdae93
-set $fg4 #a89984
-
-set $gray   #a89984
-set $red    #cc241d
-set $green  #98971a
-set $yellow #d79921
-set $blue   #458588
-set $purple #b16286
-set $aqua   #689d6a
-set $orange #d65d0e
+
# i3 config file (v4)
 
-
-
-
-

Mod Key

-
+
+

Mod Key

+

Set mod key (Mod1=<Alt>, Mod4=<Super>)

@@ -330,24 +277,29 @@ Set mod key (Mod1=<Alt>, Mod4=<Super>)
-
-

Border Style

-
+
+

Border Style

+
-
# Configure border style <normal|1pixel|pixel xx|none|pixel>
+
# Use custom colors for black
 new_window pixel 1
 new_float normal
+
+
-# Hide borders -hide_edge_borders smart +

+Hide borders +

+
+
hide_edge_borders smart
 
-
-

Font for window titles

-
+
+

Font for window titles

+
font Hack Nerd Font 11
 
@@ -355,120 +307,94 @@ hide_edge_borders smart
-
-

Color palette used for the terminal ( ~/.Xresources file )

-
-

-Colors are gathered based on the documentation https://i3wm.org/docs/userguide.html#xresources. -

- +
+

Colors Variables

+
-
set_from_resource $darkred     color1  #000000
-set_from_resource $red         color9  #000000
-set_from_resource $darkgreen   color2  #000000
-set_from_resource $green       color10 #000000
-set_from_resource $darkyellow  color3  #000000
-set_from_resource $yellow      color11 #000000
-set_from_resource $darkblue    color4  #000000
-set_from_resource $blue        color12 #000000
-set_from_resource $darkmagenta color5  #000000
-set_from_resource $magenta     color13 #000000
-set_from_resource $darkcyan    color6  #000000
-set_from_resource $cyan        color14 #000000
-set_from_resource $darkwhite   color7  #000000
-set_from_resource $white       color15 #000000
-
-# Use custom colors for black
-set $black       #282828
-set $darkblack   #1d2021
-set $transparent #00000000
+
set_from_resource $bg         color0  #000000
+set_from_resource $darkred    color1  #000000
+set_from_resource $darkgreen  color2  #000000
+set_from_resource $darkyellow color3  #000000
+set_from_resource $darkblue   color4  #000000
+set_from_resource $darkpurple color5  #000000
+set_from_resource $darkaqua   color6  #000000
+set_from_resource $darkgray   color7  #000000
+set_from_resource $gray       color8  #000000
+set_from_resource $red        color9  #000000
+set_from_resource $green      color10 #000000
+set_from_resource $yellow     color11 #000000
+set_from_resource $blue       color12 #000000
+set_from_resource $purple     color13 #000000
+set_from_resource $aqua       color14 #000000
+set_from_resource $fg         color15 #000000
 
-
-

Theme colors

-
+
+

Theme colors

+
# class                 border  backgr. text    indic.   child_border
-client.focused          $blue   $blue   $fg     $blue
-client.focused_inactive $bg     $bg     $fg     $bg
-client.urgent           $bg     $bg     $fg     $bg
-client.unfocused        $bg     $bg     $fg     $bg
-client.placeholder      $bg     $bg     $fg     $bg
+client.focused          $darkaqua $darkaqua $fg  $bg
+client.focused_inactive $bg    $bg    $fg     $bg
+client.unfocused        $bg    $bg    $fg     $bg
+client.urgent           $bg    $bg    $fg     $bg
 
-client.background       #32302F
+client.background       $bg
 
-
-

Settings for i3-gaps

-
+
+

Various Config

+
+

+Layout mode for new containers +

-
# Set inner/outer gaps
-gaps inner 10
-gaps outer -2
+
workspace_layout default
+
+
-# 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" -} +
+
focus_follows_mouse yes
 
-
-

Workspace names

-
+
+

Border

+
+
+
default_border pixel 1
+
+
+
+
+ +
+

Settings for i3-gaps

+
+
+
# for_window [class=".*"] border pixel 0
+
+
+ +
+
gaps inner 10
+gaps outer 2
+
+
+
+
+ +
+

Workspace names

+

To display names or symbols instead of plain workspace numbers you can use something like: set $ws1 1:mail and set $ws2 2:.

@@ -487,9 +413,9 @@ set $ws8 8
-
-

Use Mouse+$mod to drag floating windows

-
+
+

Use Mouse+$mod to drag floating windows

+
floating_modifier $mod
 
@@ -497,9 +423,9 @@ set $ws8 8
-
-

Back and Forth

-
+
+

Back and Forth

+
workspace_auto_back_and_forth yes
 
@@ -507,16 +433,15 @@ set $ws8 8
-
-

Application Specific

-
+
+

Application Specific

+
-
-

Open applications on specific workspaces

-
+
+

Open applications on specific workspaces

+
-
# Matlab Figures
-assign[title="^Fig"] $ws6
+
assign[title="^Fig"] $ws6 # Matlab Figures
 for_window [title="^Fig"] layout tabbed
 assign[title="^HG_Peer"] $ws6 # Name of window when export figure with matlab
 
@@ -524,24 +449,17 @@ set $ws8 8
-
-

Open specific applications in floating mode

-
+
+

Open specific applications in floating mode

+
for_window [title="File Transfer*"] floating enable
 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 Settings Manager"] floating enable border normal
-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="Timeset-gui"] floating enable border normal
-for_window [class="(?i)virtualbox"] floating enable border normal
 for_window [class="Xfburn"] floating enable
 for_window [title="^Documentation -"] floating enable border normal
 for_window [class="Yad"] floating enable
@@ -553,18 +471,24 @@ set $ws8 8
 
-
-

Scratchpad

-
+
+

Scratchpad

+
+

+Move the currently focused window to the scratchpad +

-
# move the currently focused window to the scratchpad
-bindsym $mod+Shift+BackSpace 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+BackSpace scratchpad show
+
bindsym $mod+Shift+BackSpace 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+BackSpace scratchpad show
+
@@ -573,8 +497,8 @@ bindsym $mod+BackSpace scratchpad show

Run Polybar and SXHKD

-
exec_always --no-startup-id $HOME/.config/polybar/scripts/launch.sh
-exec_always --no-startup-id sxhkd -m 1 -c ~/.config/sxhkd/sxhkdrc.i3
+
exec --no-startup-id sxhkd -m 1 -c ~/.config/sxhkd/sxhkdrc.i3
+exec --no-startup-id $HOME/.config/polybar/scripts/launch.sh
 
@@ -582,7 +506,7 @@ exec_always --no-startup-id sxhkd -m

Author: Dehaeze Thomas

-

Created: 2020-01-12 dim. 17:28

+

Created: 2020-03-01 dim. 22:50

diff --git a/docs/index.html b/docs/index.html index 68ce24b..4d55452 100644 --- a/docs/index.html +++ b/docs/index.html @@ -4,7 +4,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Dotfiles - Manjaro Linux @@ -201,50 +201,28 @@ @@ -261,18 +239,18 @@ for the JavaScript code in this tag.
  • Links to literate configs
  • Package Manager: yay
  • Git Setup
  • -
    -

    Installation

    -
    +
    +

    Installation

    +
    sudo pacman -S yay
     
    @@ -889,9 +868,9 @@ Others:
    -
    -

    CheatSheet

    -
    +
    +

    CheatSheet

    +
    @@ -955,9 +934,9 @@ To check all installed packages:

    -
    -

    Installation

    -
    +
    +

    Installation

    +
    yay -S git
     
    @@ -965,9 +944,9 @@ To check all installed packages:
    -
    -

    Configuration

    -
    +
    +

    Configuration

    +

    Git Configuration:

    @@ -985,9 +964,9 @@ To check all installed packages: https://github.com/so-fancy/diff-so-fancy

    -
    -

    Installation

    -
    +
    +

    Installation

    +
    yay -S diff-so-fancy
     
    @@ -995,9 +974,9 @@ To check all installed packages:
    -
    -

    Configuration

    -
    +
    +

    Configuration

    +
    git config --global core.pager "diff-so-fancy | less --tabs=4 -RFX"
     
    @@ -1027,9 +1006,9 @@ This is explained in a further part: Integration of Pass w

    Termite

    -
    @@ -1121,9 +1100,9 @@ This is explained in a further part: Integration of Pass w

    Unicode Rxvt

    -
    @@ -1274,9 +1253,9 @@ Most of Urxvt configuration is done in ~/.Xresources

    Fonts

    -
    -

    Installation

    -
    +
    +

    Installation

    +
    yay -S nerd-fonts-complete
     
    @@ -1339,9 +1318,9 @@ List all fonts available: fc-list

    -
    -

    Installation

    -
    +
    +

    Installation

    +
    yay -S neovim
     
    @@ -1349,9 +1328,9 @@ List all fonts available: fc-list
    -
    -

    Configuration

    -
    +
    +

    Configuration

    +

    Vim configuration

    @@ -1367,9 +1346,9 @@ List all fonts available: fc-list

    -
    -

    Installation

    -
    +
    +

    Installation

    +
    yay -S emacs
     
    @@ -1377,9 +1356,9 @@ List all fonts available: fc-list
    -
    -

    Configuration

    -
    +
    +

    Configuration

    +

    Doom Emacs configuration

    @@ -1469,12 +1448,25 @@ Edit the following file ~/.gnupg/gpg-agent.conf

    -
    max-cache-ttl 60480000
    -default-cache-ttl 60480000
    +
    default-cache-ttl 60480000
    +max-cache-ttl 60480000
     
    + +
    +

    Gnome-Keyring and automatic GnuPG key unlocking

    +
    +

    +Note: GNOME users, and by extension any gnome-keyring user may have to follow the instructions at the end of the previous section on enabling autologin. +

    + +

    +Alternative: https://github.com/cruegge/pam-gnupg +

    +
    +
    @@ -1492,9 +1484,9 @@ Alternative:
    -
    -

    Installation

    -
    +
    +

    Installation

    +
    yay -S rofi
     
    @@ -1581,9 +1573,9 @@ pass git remote add origin https://github.com/tdeh
    -
    -

    Gui Manager

    -
    +
    +

    Gui Manager

    +

    https://github.com/IJHack/qtpass

    @@ -1595,17 +1587,17 @@ pass git remote add origin https://github.com/tdeh
    -
    -

    Integration with Rofi

    -
    +
    +

    Integration with Rofi

    + -
    -

    Installation

    -
    +
    +

    Installation

    +
    yay -S rofi-pass
     
    @@ -1648,9 +1640,9 @@ This is explained here. https://github.com/languitar/pass-git-helper

    -
    -

    Installation

    -
    +
    +

    Installation

    +
    yay -S pass-git-helper
     
    @@ -1658,9 +1650,9 @@ This is explained here.
    -
    -

    Configuration

    -
    +
    +

    Configuration

    +

    First, add the relation between repository addresses and entries in pass. This is done in the following config file .config/pass-git-helper/git-pass-mapping.ini:

    @@ -1724,9 +1716,9 @@ Bitwarden https://github.com/bitwarde

    -
    @@ -1899,9 +1891,9 @@ And then browse to http://127.0.0.1:5001.

    -
    -

    Installation

    -
    +
    +

    Installation

    +
    yay -S qutebrowser
     
    @@ -1913,9 +1905,9 @@ And then browse to http://127.0.0.1:5001.

    View Pdf inside qutebrowser with pdfjs

    -
    -

    Installation

    -
    +
    +

    Installation

    +
    yay -S pdfjs
     
    @@ -1923,9 +1915,9 @@ And then browse to http://127.0.0.1:5001.
    -
    -

    Usage

    -
    +
    +

    Usage

    +

    When opening a pdf file on qutebrowser, you’ll be ask for options:

    @@ -2079,9 +2071,9 @@ If sound is not working, should run pulseaudio --kill to kill the d

    -
    -

    Installation

    -
    +
    +

    Installation

    +
    yay -S mpd
     
    @@ -2176,9 +2168,9 @@ If mopidy is used, MPD should be disabled. (systemctl disable --user mpd.s

    -
    -

    Installation

    -
    +
    +

    Installation

    +
    yay -S ncmpcpp
     
    @@ -2196,9 +2188,9 @@ The key bindings can be configured here: ~/.ncmpcpp/bindings.
    -
    -

    Cheatsheet

    -
    +
    +

    Cheatsheet

    +

    https://pkgbuild.com/~jelle/ncmpcpp/

    @@ -2229,9 +2221,9 @@ The key bindings can be configured here: ~/.ncmpcpp/bindings.

    -
    -

    Installation

    -
    +
    +

    Installation

    +
    yay -S beets
     
    @@ -2239,18 +2231,18 @@ The key bindings can be configured here: ~/.ncmpcpp/bindings.
    -
    -

    Configuration

    -
    +
    +

    Configuration

    +

    Configuration folder: ~/.config/beets/

    -
    -

    Cheatsheet

    -
    +
    +

    Cheatsheet

    +
    @@ -2285,9 +2277,9 @@ Configuration folder: ~/.config/beets/

    Media Player - MPV

    -
    -

    Installation

    -
    +
    +

    Installation

    +
    yay -S mpv
     
    @@ -2304,9 +2296,9 @@ The configuration is set in /.config/mpv/input.conf.
    -
    -

    CheatSheet

    -
    +
    +

    CheatSheet

    +
    @@ -2334,9 +2326,9 @@ The configuration is set in /.config/mpv/input.conf.

    -
    -

    Installation

    -
    +
    +

    Installation

    +
    yay -S catt
     
    @@ -2553,9 +2545,9 @@ This looks for contacts in all indexed emails.

    -
    -

    Installation

    -
    +
    +

    Installation

    +
    yay -S weechat
     
    @@ -2666,9 +2658,9 @@ Then we install some dependencies
    -
    -

    Configuration

    -
    + -
    -

    CheatSheet

    -
    +
    +

    CheatSheet

    +
    @@ -2773,9 +2765,9 @@ Then, on weechat, type /edit.

    -
    -

    Installation

    -
    +
    +

    Installation

    +
    yay -S python2-websocket-client
     
    @@ -2891,9 +2883,9 @@ It runs weechat inside tmux.

    -
    -

    Installation

    -
    +
    +

    Installation

    +
    yay -S isync
     
    @@ -2901,9 +2893,9 @@ It runs weechat inside tmux.
    -
    -

    Configuration

    -
    +
    +

    Configuration

    +

    ~/.mbsyncrc

    @@ -2957,9 +2949,9 @@ systemctl --user start syncmail.timer

    -
    -

    Installation

    -
    +
    +

    Installation

    +
    yay -S msmtp
     
    @@ -2985,9 +2977,9 @@ systemctl --user start syncmail.timer

    -
    -

    Installation

    -
    +
    +

    Installation

    +
    yay -S neomutt
     
    @@ -3024,9 +3016,9 @@ systemctl --user start syncmail.timer
    -
    -

    Ressources

    -
    +
    +

    Ressources

    + -
    -

    Installation

    -
    +
    +

    Installation

    +
    yay -S ranger
     
    @@ -3075,9 +3067,9 @@ Configuration files:
    -
    -

    Configuration

    -
    +
    +

    Configuration

    +

    The configuration file is ~/.config/ranger/rc.conf.

    @@ -3125,9 +3117,9 @@ It works better with Urxvt.

    -
    -

    Installation

    -
    +
    +

    Installation

    +
    yay -S sxiv
     
    @@ -3145,9 +3137,9 @@ It works better with Urxvt.
    -
    -

    Cheatsheet

    -
    +
    +

    Cheatsheet

    +
    @@ -3221,9 +3213,9 @@ Configuration file: SXHKD.

    -
    -

    Installation

    -
    +
    +

    Installation

    +
    yay -S i3-gaps
     
    @@ -3231,9 +3223,9 @@ Configuration file: SXHKD.
    -
    -

    Configuration

    -
    +
    +

    Configuration

    +

    ~/.i3/config

    @@ -3253,9 +3245,9 @@ Configuration file: SXHKD.

    -
    -

    Installation

    -
    +
    +

    Installation

    +
    yay -S polybar
     
    @@ -3276,9 +3268,9 @@ Configuration file: SXHKD.

    -
    -

    Installation

    -
    +
    +

    Installation

    +
    yay -S picom
     
    @@ -3286,9 +3278,9 @@ Configuration file: SXHKD.
    -
    -

    Configuration

    -
    +
    +

    Configuration

    +

    ~/.config/picom/picom.conf

    @@ -3318,9 +3310,9 @@ Compton is run from .xprofile config in the background:

    -
    -

    Installation

    -
    +
    +

    Installation

    +
    yay -S dunst dunstify
     
    @@ -3328,18 +3320,18 @@ Compton is run from .xprofile config in the background:
    -
    -

    Configuration

    -
    +
    +

    Configuration

    +

    ~/.config/dunst/dunstrc

    -
    @@ -3788,9 +3780,9 @@ In order for LaTeX to be aware of new packages/classes, run sudo texhash -
    @@ -4084,9 +4076,9 @@ To check the status of the service:

    -
    -

    Installation

    -
    +
    +

    Installation

    +
    yay -S khal
     
    @@ -4143,9 +4135,9 @@ On the phone:

    -
    -

    Installation

    -
    +
    +

    Installation

    +
    yay -S newboat
     
    @@ -4153,9 +4145,9 @@ On the phone:
    -
    -

    Configuration

    -
    +
    +

    Configuration

    +

    https://newsboat.org/releases/2.12/docs/newsboat.html ~/.newsboat/ @@ -4163,9 +4155,9 @@ On the phone:

    -
    -

    CheatSheet

    -
    +
    +

    CheatSheet

    +
    -
    -

    Installation

    -
    +
    +

    Installation

    +
    yay -S wunderline
     
    @@ -4200,9 +4192,9 @@ On the phone:
    -
    -

    Cheatsheet

    -
    +
    +

    Cheatsheet

    +

    Add a task with:

    @@ -4262,9 +4254,9 @@ Other commands:

    -
    -

    Configuration

    -
    +
    +

    Configuration

    +

    ~/.config/nitrogen/nitrogen.cfg

    @@ -4288,9 +4280,9 @@ Other commands: https://pwmt.org/projects/zathura/

    -
    -

    Installation

    -
    +
    +

    Installation

    +
    yay -S zathura
     
    @@ -4310,18 +4302,18 @@ It seems that mupdf is better that poppler to view pdf.
    -
    -

    Configuration

    -
    +
    +

    Configuration

    +

    ~/.config/zathura/zathurarc

    -
    -

    Cheatsheet

    -
    +
    +

    Cheatsheet

    +
    @@ -4424,9 +4416,9 @@ pdfpc is a great tool for showing pdf presentations. It support: -
    -

    Installation

    -
    +
    +

    Installation

    +
    yay -S pdfpc
     
    @@ -4444,9 +4436,9 @@ pdfpc is a great tool for showing pdf presentations. It support:
    -
    -

    Usage

    -
    +
    +

    Usage

    +
    pdfpc filename.pdf
     
    @@ -4585,9 +4577,9 @@ This help changes many applications colors at once.

    -
    -

    Installation

    -
    +
    +

    Installation

    +
    yay -S nordvpn-bin
     
    @@ -4595,9 +4587,9 @@ This help changes many applications colors at once.
    -
    -

    Configuration

    -
    +
    +

    Configuration

    +
    sudo systemctl enable nordvpnd.service
     sudo systemctl start nordvpnd.service
    @@ -4606,9 +4598,9 @@ This help changes many applications colors at once.
     
    -
    -

    Usage

    -
    +
    +

    Usage

    +
    @@ -4665,9 +4657,9 @@ This help changes many applications colors at once. -
    -

    Others

    -
    +
    +

    Others

    +

    Reddit on terminal: rtv

    @@ -5033,9 +5025,9 @@ Will create split1.pdf to split6.pdf files correspondi
    -
    -

    Others

    -
    +
    +

    Others

    +
    @@ -5291,9 +5283,9 @@ Use apack and aunpack: -
    -

    Some notes

    -
    +
    +

    Some notes - Systemd

    +

    To improve the startup time.

    @@ -5304,11 +5296,20 @@ To improve the startup time. sudo systemctl disable systemd-backlight@backlight\:intel_backlight.service
    + +

    +To see next timers +

    +
    +
    systemctl --user list-timers
    +
    -
    -

    Ressources

    -
    +
    + +
    +

    Ressources

    +

    Dotfiles

    @@ -5342,7 +5343,7 @@ To improve the startup time.

    Author: Dehaeze Thomas

    -

    Created: 2020-01-28 mar. 21:32

    +

    Created: 2020-03-01 dim. 22:50

    diff --git a/docs/mail.html b/docs/mail.html index 38bfb16..6c2860d 100644 --- a/docs/mail.html +++ b/docs/mail.html @@ -4,7 +4,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Mail Configuration @@ -201,50 +201,28 @@ @@ -261,8 +239,8 @@ for the JavaScript code in this tag.
  • Synchronize Mailboxes - Mbsync @@ -270,29 +248,25 @@ for the JavaScript code in this tag.
  • Send Mails - Msmtp
  • -
  • TODO Mail Indexer - Mu - -
  • +
  • TODO Mail Indexer - Mu
  • Mail Client - NeoMutt
  • -
    -

    Gmail Account

    -
    +
    +

    Gmail Account

    +
    IMAPAccount gmail
     Host imap.gmail.com
    @@ -495,9 +469,9 @@ Sync Pull
     
    -
    -

    ESRF Account

    -
    +
    +

    ESRF Account

    +
    IMAPAccount esrf
     Host imaps.esrf.fr
    @@ -712,9 +686,9 @@ tls_certcheck off
     
    -
    -

    Gmail Account

    -
    +
    +

    Gmail Account

    +
    account      gmail
     host         smtp.gmail.com
    @@ -728,9 +702,9 @@ passwordeval "pass email/dehaeze.thomas@gmail.com"
     
    -
    -

    ESRF Account

    -
    +
    +

    ESRF Account

    +
    account        esrf
     host           smtps.esrf.fr
    @@ -795,18 +769,10 @@ passwordeval   "pass email/tdehaeze@uliege.be"
     
    -
    -
    -

    Mail Client - NeoMutt

    @@ -1113,9 +1079,9 @@ macro index q "<shell-escape>if [ $TMUX ]; then t
    -
    -

    Generic

    -
    +
    +

    Generic

    +
    bind generic Q exit
     
    @@ -1279,9 +1245,9 @@ bind index,pager N search-opposite
     
    -
    -

    Attachments

    -
    +
    +

    Attachments

    +
    bind attach l view-attach
     
    @@ -1374,9 +1340,9 @@ bind browser q exit
     
    -
    -

    Generic

    -
    +
    +

    Generic

    +

    Enter Command

    @@ -1398,9 +1364,9 @@ macro index M "<save-message>?<toggle-mailboxe
    -
    -

    Sidebar

    -
    +
    +

    Sidebar

    +
    bind index,pager \Ck sidebar-prev
     bind index,pager \Cj sidebar-next
    @@ -1563,9 +1529,9 @@ color index brightcolor000 color001 "~v~(~D)"
     
    -
    -

    Sidebar

    -
    +
    +

    Sidebar

    +
    color sidebar_indicator color000       color021  # Mailbox is open
     color sidebar_highlight color000       color003  # Mailbox is highlighted
    @@ -1588,9 +1554,9 @@ color header     brightcolor004 color000 "^(Subject)"
     
    -
    -

    Attachments

    -
    +
    +

    Attachments

    +
    # Color if the attachment is autoviewed
     color   attach_headers     brightgreen     default    "Autoview"
    @@ -1736,9 +1702,9 @@ macro index,pager gm "<change-folder>+gmail/Inbox
     

    Gmail

    -
    -
    Configuration
    -
    +
    +
    Configuration
    +
    set from     = "dehaeze.thomas@gmail.com"
     set sendmail = "msmtp -a gmail"
    @@ -1762,9 +1728,9 @@ macro index,pager D \
     
    -
    -
    Signature
    -
    +
    +
    Signature
    +
    Thomas Dehaeze
     
    @@ -1784,9 +1750,9 @@ This empty code block is used to add a new line after signature

    ESRF

    -
    -
    Configuration
    -
    +
    +
    Configuration
    +
    set from     = "thomas.dehaeze@esrf.fr"
     set sendmail = "msmtp -a esrf"
    @@ -1810,9 +1776,9 @@ macro index,pager D \
     
    -
    -
    Signature
    -
    +
    +
    Signature
    +
    Thomas Dehaeze
     
    @@ -1832,9 +1798,9 @@ This empty code block is used to add a new line after signature

    ULG

    -
    -
    Configuration
    -
    +
    +
    Configuration
    +
    set from     = "thomas.dehaeze@doct.uliege.be"
     set sendmail = "msmtp -a ulg"
    @@ -1858,9 +1824,9 @@ macro index,pager D \
     
    -
    -
    Signature
    -
    +
    +
    Signature
    +
    Thomas Dehaeze
     
    @@ -1880,9 +1846,9 @@ This empty code block is used to add a new line after signature

    ULIEGE

    -
    -
    Configuration
    -
    +
    +
    Configuration
    +
    set from     = "tdehaeze@uliege.be"
     set sendmail = "msmtp -a uliege"
    @@ -1906,9 +1872,9 @@ macro index,pager D \
     
    -
    -
    Signature
    -
    +
    +
    Signature
    +
    Thomas Dehaeze
     
    @@ -2043,9 +2009,9 @@ hdr_order from: to: cc: date: subject: #
    -
    -

    Sidebar

    -
    +
    +

    Sidebar

    +

    General Config

    @@ -2169,9 +2135,9 @@ unset move
    -
    -

    Attachments

    -
    +
    +

    Attachments

    +

    Attachment View Options

    @@ -2370,7 +2336,7 @@ text/rtf; libreoffice --nologo --writer '%s'; co

    Author: Dehaeze Thomas

    -

    Created: 2020-01-28 mar. 21:32

    +

    Created: 2020-03-01 dim. 22:50

    diff --git a/docs/music.html b/docs/music.html index bfec918..ba95b9d 100644 --- a/docs/music.html +++ b/docs/music.html @@ -4,7 +4,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Music/Sound Configuration @@ -201,50 +201,28 @@ @@ -265,20 +243,6 @@ for the JavaScript code in this tag.
  • Bindings
  • -
  • MPD (not used anymore) - -
  • Beets
  • Mopidy
  • Radio with curseradio
  • @@ -315,22 +279,27 @@ Cheatsheet: https://pkgbuild.com/

    Config

    +

    +Configuration directory. +

    ncmpcpp_directory = ~/.config/ncmpcpp
     
    +

    +MPD Configuration. +

    mpd_host = localhost
     mpd_port = 6600
    +mpd_music_dir = ~/Music
     
    -
    -
    mpd_music_dir = ~/Music
    -
    -
    - +

    +Notification of song change. +

    execute_on_song_change = dunstify --replace=19845 "Now Playing ♫" "$(mpc current)"
     
    @@ -381,408 +350,6 @@ def_key "-"
    -
    -

    MPD (not used anymore)

    -
    - -
    -

    Files and directories

    -
    -
    -
    music_directory     "~/Music"
    -playlist_directory      "~/.config/mpd/playlists"
    -db_file         "~/.config/mpd/database"
    -log_file            "~/.config/mpd/log"
    -pid_file            "~/.config/mpd/pid"
    -state_file          "~/.config/mpd/state"
    -
    -
    -
    -
    - -
    -

    General music daemon options

    -
    -
    -
    # This setting specifies the user that MPD will run as. MPD should never run as
    -# root and you may use this setting to make MPD change its user ID after
    -# initialization. This setting is disabled by default and MPD is run as the
    -# current user.
    -#
    -#user               "nobody"
    -#
    -# This setting specifies the group that MPD will run as. If not specified
    -# primary group of user specified with "user" setting will be used (if set).
    -# This is useful if MPD needs to be a member of group such as "audio" to
    -# have permission to use sound card.
    -#
    -#group              "nogroup"
    -#
    -# This setting sets the address for the daemon to listen on. Careful attention
    -# should be paid if this is assigned to anything other then the default, any.
    -# This setting can deny access to control of the daemon. Not effective if
    -# systemd socket activiation is in use.
    -#
    -# For network
    -#bind_to_address        "any"
    -#
    -# And for Unix Socket
    -#bind_to_address        "~/.mpd/socket"
    -#
    -# This setting is the TCP port that is desired for the daemon to get assigned
    -# to.
    -#
    -#port               "6600"
    -#
    -# This setting controls the type of information which is logged. Available
    -# setting arguments are "default", "secure" or "verbose". The "verbose" setting
    -# argument is recommended for troubleshooting, though can quickly stretch
    -# available resources on limited hardware storage.
    -#
    -#log_level          "default"
    -#
    -# Setting "restore_paused" to "yes" puts MPD into pause mode instead
    -# of starting playback after startup.
    -#
    -#restore_paused "no"
    -#
    -# This setting enables MPD to create playlists in a format usable by other
    -# music players.
    -#
    -#save_absolute_paths_in_playlists   "no"
    -#
    -# This setting defines a list of tag types that will be extracted during the
    -# audio file discovery process. The complete list of possible values can be
    -# found in the user manual.
    -#metadata_to_use    "artist,album,title,track,name,genre,date,composer,performer,disc"
    -#
    -# This example just enables the "comment" tag without disabling all
    -# the other supported tags:
    -#metadata_to_use "+comment"
    -#
    -# This setting enables automatic update of MPD's database when files in
    -# music_directory are changed.
    -#
    -#auto_update    "yes"
    -#
    -# Limit the depth of the directories being watched, 0 means only watch
    -# the music directory itself.  There is no limit by default.
    -#
    -#auto_update_depth "3"
    -#
    -
    -
    -
    -
    - -
    -

    Symbolic link behavior

    -
    -
    -
    # If this setting is set to "yes", MPD will discover audio files by following
    -# symbolic links outside of the configured music_directory.
    -#
    -#follow_outside_symlinks    "yes"
    -#
    -# If this setting is set to "yes", MPD will discover audio files by following
    -# symbolic links inside of the configured music_directory.
    -#
    -#follow_inside_symlinks     "yes"
    -#
    -
    -
    -
    -
    - -
    -

    Zeroconf / Avahi Service Discovery

    -
    -
    -
    # If this setting is set to "yes", service information will be published with
    -# Zeroconf / Avahi.
    -#
    -#zeroconf_enabled       "yes"
    -#
    -# The argument to this setting will be the Zeroconf / Avahi unique name for
    -# this MPD server on the network. %h will be replaced with the hostname.
    -#
    -#zeroconf_name          "Music Player @ %h"
    -#
    -
    -
    -
    -
    - -
    -

    Permissions

    -
    -
    -
    # If this setting is set, MPD will require password authorization. The password
    -# setting can be specified multiple times for different password profiles.
    -#
    -#password                        "password@read,add,control,admin"
    -#
    -# This setting specifies the permissions a user has who has not yet logged in.
    -#
    -#default_permissions             "read,add,control,admin"
    -#
    -
    -
    -
    -
    - -
    -

    Database

    -
    -
    -
    #database {
    -#       plugin "proxy"
    -#       host "other.mpd.host"
    -#       port "6600"
    -#}
    -
    -
    -
    -
    - -
    -

    Input

    -
    -
    -
    input {
    -        plugin "curl"
    -#       proxy "proxy.isp.com:8080"
    -#       proxy_user "user"
    -#       proxy_password "password"
    -}
    -
    -
    -
    -
    - -
    -

    Audio Output

    -
    -
    -
    # MPD supports various audio output types, as well as playing through multiple
    -# audio outputs at the same time, through multiple audio_output settings
    -# blocks. Setting this block is optional, though the server will only attempt
    -# autodetection for one sound card.
    -#
    -# An example of an ALSA output:
    -#
    -#audio_output {
    -#    type       "alsa"
    -#    name       "My ALSA Device"
    -#    period_time "50000"
    -##  device      "hw:0,0"    # optional
    -##  mixer_type      "hardware"  # optional
    -##  mixer_device    "default"   # optional
    -##  mixer_control   "PCM"       # optional
    -##  mixer_index "0"     # optional
    -#}
    -
    -# For NCMPCPP Visualizer
    -audio_output {
    -       type            "fifo"
    -       name            "Visualizer feed"
    -       path            "/tmp/mpd.fifo"
    -       format          "44100:16:2"
    -}
    -
    -#
    -# An example of an OSS output:
    -#
    -#audio_output {
    -#   type        "oss"
    -#   name        "My OSS Device"
    -##  device      "/dev/dsp"  # optional
    -##  mixer_type      "hardware"  # optional
    -##  mixer_device    "/dev/mixer"    # optional
    -##  mixer_control   "PCM"       # optional
    -#}
    -#
    -# An example of a shout output (for streaming to Icecast):
    -#
    -#audio_output {
    -#   type        "shout"
    -#   encoder     "vorbis"        # optional
    -#   name        "My Shout Stream"
    -#   host        "localhost"
    -#   port        "8000"
    -#   mount       "/mpd.ogg"
    -#   password    "hackme"
    -#   quality     "5.0"
    -#   bitrate     "128"
    -#   format      "44100:16:1"
    -##  protocol    "icecast2"      # optional
    -##  user        "source"        # optional
    -##  description "My Stream Description" # optional
    -##  url     "http://example.com"    # optional
    -##  genre       "jazz"          # optional
    -##  public      "no"            # optional
    -##  timeout     "2"         # optional
    -##  mixer_type      "software"      # optional
    -#}
    -#
    -# An example of a recorder output:
    -#
    -#audio_output {
    -#   type        "recorder"
    -#   name        "My recorder"
    -#   encoder     "vorbis"        # optional, vorbis or lame
    -#   path        "/var/lib/mpd/recorder/mpd.ogg"
    -##  quality     "5.0"           # do not define if bitrate is defined
    -#   bitrate     "128"           # do not define if quality is defined
    -#   format      "44100:16:1"
    -#}
    -#
    -# An example of a httpd output (built-in HTTP streaming server):
    -#
    -#audio_output {
    -#   type        "httpd"
    -#   name        "My HTTP Stream"
    -#   encoder     "vorbis"        # optional, vorbis or lame
    -#   port        "8000"
    -#   bind_to_address "0.0.0.0"       # optional, IPv4 or IPv6
    -##  quality     "5.0"           # do not define if bitrate is defined
    -#   bitrate     "128"           # do not define if quality is defined
    -#   format      "44100:16:1"
    -#   max_clients "0"         # optional 0=no limit
    -#}
    -#
    -# An example of a pulseaudio output (streaming to a remote pulseaudio server)
    -#
    -audio_output {
    -  type      "pulse"
    -  name      "My Pulse Output"
    -#  server   "localhost"     # optional
    -#   sink        "remote_server_sink"    # optional
    -}
    -#
    -# An example of a winmm output (Windows multimedia API).
    -#
    -#audio_output {
    -#   type        "winmm"
    -#   name        "My WinMM output"
    -##  device      "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional
    -#       or
    -##  device      "0"     # optional
    -##  mixer_type  "hardware"  # optional
    -#}
    -#
    -# An example of an openal output.
    -#
    -#audio_output {
    -#   type        "openal"
    -#   name        "My OpenAL output"
    -##  device      "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional
    -#}
    -#
    -# An example of an sndio output.
    -#
    -#audio_output {
    -#   type        "sndio"
    -#   name        "sndio output"
    -#   mixer_type  "hardware"
    -#}
    -#
    -# An example of an OS X output:
    -#
    -#audio_output {
    -#   type        "osx"
    -#   name        "My OS X Device"
    -##  device      "Built-in Output"   # optional
    -##  channel_map      "-1,-1,0,1"    # optional
    -#}
    -#
    -## Example "pipe" output:
    -#
    -#audio_output {
    -#   type        "pipe"
    -#   name        "my pipe"
    -#   command     "aplay -f cd 2>/dev/null"
    -## Or if you're want to use AudioCompress
    -#   command     "AudioCompress -m | aplay -f cd 2>/dev/null"
    -## Or to send raw PCM stream through PCM:
    -#   command     "nc example.org 8765"
    -#   format      "44100:16:2"
    -#}
    -#
    -## An example of a null output (for no audio output):
    -#
    -#audio_output {
    -#   type        "null"
    -#   name        "My Null Output"
    -#   mixer_type      "none"          # optional
    -#}
    -#
    -
    -
    -
    -
    - -
    -

    Normalization automatic volume adjustments

    -
    -
    -
    # This setting specifies the type of ReplayGain to use. This setting can have
    -# the argument "off", "album", "track" or "auto". "auto" is a special mode that
    -# chooses between "track" and "album" depending on the current state of
    -# random playback. If random playback is enabled then "track" mode is used.
    -# See <http://www.replaygain.org> for more details about ReplayGain.
    -# This setting is off by default.
    -#
    -#replaygain         "album"
    -#
    -# This setting sets the pre-amp used for files that have ReplayGain tags. By
    -# default this setting is disabled.
    -#
    -#replaygain_preamp      "0"
    -#
    -# This setting sets the pre-amp used for files that do NOT have ReplayGain tags.
    -# By default this setting is disabled.
    -#
    -#replaygain_missing_preamp  "0"
    -#
    -# This setting enables or disables ReplayGain limiting.
    -# MPD calculates actual amplification based on the ReplayGain tags
    -# and replaygain_preamp / replaygain_missing_preamp setting.
    -# If replaygain_limit is enabled MPD will never amplify audio signal
    -# above its original level. If replaygain_limit is disabled such amplification
    -# might occur. By default this setting is enabled.
    -#
    -#replaygain_limit       "yes"
    -#
    -# This setting enables on-the-fly normalization volume adjustment. This will
    -# result in the volume of all playing audio to be adjusted so the output has
    -# equal "loudness". This setting is disabled by default.
    -#
    -#volume_normalization       "no"
    -#
    -
    -
    -
    -
    - -
    -

    Character Encoding

    -
    -
    -
    # If file or directory names do not display correctly for your locale then you
    -# may need to modify this setting.
    -#
    -#filesystem_charset     "UTF-8"
    -
    -
    -
    -
    -
    -

    Beets

    @@ -793,9 +360,12 @@ state_file "~/.config/mpd/state"
    directory: ~/Music
     library: ~/Music/musiclibrary.db
    +art_filename: cover
     
     import:
       move: yes
    +
    +plugins: fromfilename discogs
     
    @@ -809,7 +379,7 @@ import: username = dehaeze.thomas@gmail.com password = <<get-password(passname="spotify.com/dehaeze.thomas@gmail.com")>> client_id = 3b740ab1-f26f-4c38-aee0-4dcb9e58b375 -client_secret = mspixJ52Yq5xQKF980Rij8_geTM_2VU1Euk5K86uwfg= +client_secret = <<get-password(passname="spotify/client_secret")>> bitrate = 320 [mpd] @@ -823,6 +393,22 @@ import: command_blacklist = listall,listallinfo default_playlist_scheme = m3u +[file] +enabled = true +media_dirs = /home/thomas/Music +excluded_file_extensions = + .db + .directory + .html + .jpeg + .jpg + .log + .nfo + .pdf + .png + .txt + .zip + [audio] output = tee name=t t. ! queue ! autoaudiosink t. ! queue ! audioresample ! audioconvert ! audio/x-raw,rate=44100,channels=2,format=S16LE ! wavenc ! filesink location=/tmp/mpd.fifo
    @@ -861,7 +447,7 @@ import:

    Author: Dehaeze Thomas

    -

    Created: 2020-01-28 mar. 21:32

    +

    Created: 2020-03-01 dim. 22:50

    diff --git a/docs/newsboat.html b/docs/newsboat.html index 22927f2..364542a 100644 --- a/docs/newsboat.html +++ b/docs/newsboat.html @@ -4,7 +4,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Newsboat Configuration @@ -201,50 +201,28 @@ @@ -352,7 +330,7 @@ player "mpv"
    notify-format "%n unread articles"
    -notify-program ~/scripts/newsboat-notify.sh
    +notify-program ~/.config/newsboat/scripts/newsboat-notify.sh
     notify-always no
     
    @@ -362,7 +340,7 @@ notify-always no

    Notification Script

    -
    dunstify -replace=38492 "Newsbeuter " "$1"
    +
    dunstify -replace=38492 "Newsboat " "$1"
     
    @@ -420,10 +398,10 @@ macro , open-in-browser # Download Video with Youtube-DL # TODO - Should write a script for that? Maybe open a tmux script if newsboat is in tmux pane? -macro t set browser "~/scripts/download-video.sh %u" ; open-in-browser ; set browser "qutebrowser %u" +macro t set browser "~/bin/yt-video %u" ; open-in-browser ; set browser "qutebrowser %u" # Download Audio with Youtube-DL -macro a set browser "~/scripts/download-audio.sh %u" ; open-in-browser ; set browser "qutebrowser %u" +macro a set browser "~/bin/yt-audio %u" ; open-in-browser ; set browser "qutebrowser %u" # Open Video with MPV macro v set browser "setsid nohup mpv %u &> /dev/null &" ; open-in-browser ; set browser "qutebrowser %u" @@ -614,7 +592,7 @@ http://radiofrance-podcast.net/podcast09/rss_18911.xml

    Author: Dehaeze Thomas

    -

    Created: 2020-01-11 sam. 22:20

    +

    Created: 2020-03-01 dim. 22:50

    diff --git a/docs/polybar.html b/docs/polybar.html index 831789a..3fba3d0 100644 --- a/docs/polybar.html +++ b/docs/polybar.html @@ -4,7 +4,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Polybar Configuration @@ -201,50 +201,28 @@ @@ -285,10 +263,16 @@ for the JavaScript code in this tag.
  • NordVPN
  • +
  • Packages + +
  • Dunst
    • Dunst Status script
    • @@ -324,41 +308,22 @@ for the JavaScript code in this tag.
      [colors]
      -base00 = ${xrdb:color0:#000000}
      -base01 = ${xrdb:color10:#000000}
      -base02 = ${xrdb:color11:#000000}
      -base03 = ${xrdb:color8:#000000}
      -base04 = ${xrdb:color12:#000000}
      -base05 = ${xrdb:color7:#000000}
      -base06 = ${xrdb:color13:#000000}
      -base07 = ${xrdb:color15:#000000}
      -base08 = ${xrdb:color1:#000000}
      -base09 = ${xrdb:color9:#000000}
      -base0A = ${xrdb:color3:#000000}
      -base0B = ${xrdb:color2:#000000}
      -base0C = ${xrdb:color6:#000000}
      -base0D = ${xrdb:color4:#000000}
      -base0E = ${xrdb:color5:#000000}
      -base0F = ${xrdb:color14:#000000}
      -
      -; based on  http://chriskempson.com/projects/base16/
      -background = ${colors.base00}
      -background-light = ${colors.base01}
      -background-selection = ${colors.base02}
      -comments = ${colors.base03}
      -foreground-dark = ${colors.base04}
      -foreground = ${colors.base05}
      -foreground-light = ${colors.base06}
      -foreground-light-bis = ${colors.base07}
      -red = ${colors.base08}
      -orange = ${colors.base09}
      -brown = ${colors.base0A}
      -green = ${colors.base0B}
      -turquoise = ${colors.base0C}
      -blue = ${colors.base0D}
      -purple = ${colors.base0E}
      -magenta = ${colors.base0F}
      -black = ${#000000}
      +bg = ${xrdb:background}
      +red = ${xrdb:color1}
      +green = ${xrdb:color2}
      +yellow = ${xrdb:color3}
      +blue = ${xrdb:color4}
      +purple = ${xrdb:color5}
      +aqua = ${xrdb:color6}
      +gray = ${colors.color7}
      +darkgray = ${colors.color8}
      +darkred = ${xrdb:color9}
      +darkgreen = ${xrdb:color10}
      +darkyellow = ${xrdb:color11}
      +darkblue = ${xrdb:color12}
      +darkpurple = ${xrdb:color13}
      +darkaqua = ${xrdb:color14}
      +fg = ${xrdb:foreground}
       
      @@ -390,8 +355,8 @@ for the JavaScript code in this tag. height = 27 radius = 0.0 -background = ${colors.background} -foreground = ${colors.foreground} +background = ${colors.bg} +foreground = ${colors.fg} line-size = 2 @@ -409,14 +374,14 @@ for the JavaScript code in this tag. modules-left = i3 bspwm xwindow modules-center = -modules-right = pulseaudio xbacklightredshift nordvpn lockscreen dunst unread_mail cpu battery temperature date +modules-right = pulseaudio xbacklight redshift packages nordvpn lockscreen dunst unread_mail cpu battery temperature date -wm-restack = bspwm +wm-restack = i3 tray-position = right tray-detached = true tray-padding = 0 -tray-background = ${colors.background} +tray-background = ${colors.bg}
  • @@ -453,28 +418,28 @@ for the JavaScript code in this tag.
    -
    label-mode-foreground = ${colors.background}
    -label-mode-background = ${colors.foreground}
    +
    label-mode-foreground = ${colors.bg}
    +label-mode-background = ${colors.fg}
     label-mode-padding = 1
     
     # focused = Active workspace on focused monitor
     label-focused = %icon% %index%
    -label-focused-foreground = ${colors.foreground}
    -label-focused-background = ${colors.background}
    -label-focused-underline = ${colors.turquoise}
    +label-focused-foreground = ${colors.fg}
    +label-focused-background = ${colors.bg}
    +label-focused-underline = ${colors.aqua}
     label-focused-padding = 1
     
     # unfocused = Inactive workspace on any monitor
     label-unfocused = %icon% %index%
    -label-unfocused-foreground = ${colors.foreground}
    -label-unfocused-background = ${colors.background}
    -label-unfocused-underline = ${colors.background}
    +label-unfocused-foreground = ${colors.fg}
    +label-unfocused-background = ${colors.bg}
    +label-unfocused-underline = ${colors.bg}
     label-unfocused-padding = 1
     
     # visible = Active workspace on unfocused monitor
     label-visible = %icon% %index%
    -label-visible-background = ${colors.background}
    -label-visible-underline = ${colors.turquoise}
    +label-visible-background = ${colors.bg}
    +label-visible-underline = ${colors.aqua}
     label-visible-padding = 1
     
     # urgent = Workspace with urgency hint set
    @@ -512,13 +477,13 @@ for the JavaScript code in this tag.
     ws-icon-default =
     
     label-focused = %icon%
    -label-focused-foreground = ${colors.background}
    -label-focused-background = ${colors.turquoise}
    -label-focused-underline= ${colors.turquoise}
    +label-focused-foreground = ${colors.bg}
    +label-focused-background = ${colors.aqua}
    +label-focused-underline= ${colors.aqua}
     label-focused-padding = 1
     
     label-occupied = %icon%
    -label-occupied-underline = ${colors.foreground}
    +label-occupied-underline = ${colors.fg}
     label-occupied-padding = 1
     
     label-urgent = %icon%
    @@ -526,7 +491,7 @@ for the JavaScript code in this tag.
     label-urgent-padding = 1
     
     label-empty = %icon%
    -label-empty-foreground = ${colors.foreground}
    +label-empty-foreground = ${colors.fg}
     label-empty-padding = 1
     
    @@ -562,8 +527,8 @@ for the JavaScript code in this tag. # Used to display the state of random/repeat/repeatone/single # Only applies if <icon-[random|repeat|repeatone|single]> is used -toggle-on-foreground = ${colors.foreground-light} -toggle-off-foreground = ${colors.comments} +toggle-on-foreground = ${colors.fg} +toggle-off-foreground = ${colors.gray} bar-progress-width = 15 bar-progress-indicator = | @@ -607,9 +572,9 @@ for the JavaScript code in this tag. type = internal/cpu interval = 2 -format-prefix-foreground = ${colors.foreground} +format-prefix-foreground = ${colors.fg} -format-underline = ${colors.background} +format-underline = ${colors.bg} label = %{A1:$TERMINAL -e "htop" &:} ﬙ %percentage:2%% %{A} @@ -670,7 +635,7 @@ for the JavaScript code in this tag. bar-volume-fill-font = 2 bar-volume-empty = ─ bar-volume-empty-font = 2 -bar-volume-empty-foreground = ${colors.foreground} +bar-volume-empty-foreground = ${colors.fg}
    @@ -694,22 +659,22 @@ for the JavaScript code in this tag. format-discharging-underline = ${colors.red} format-full-prefix = %{A1:xfce4-power-manager-settings &:} %{A} -format-full-prefix-foreground = ${colors.foreground} -format-full-underline = ${colors.background} +format-full-prefix-foreground = ${colors.fg} +format-full-underline = ${colors.bg} ramp-capacity-0 =  ramp-capacity-1 =  ramp-capacity-2 =  ramp-capacity-3 =  ramp-capacity-4 =  -ramp-capacity-foreground = ${colors.foreground} +ramp-capacity-foreground = ${colors.fg} animation-charging-0 =  animation-charging-1 =  animation-charging-2 =  animation-charging-3 =  animation-charging-4 =  -animation-charging-foreground = ${colors.foreground} +animation-charging-foreground = ${colors.fg} animation-charging-framerate = 750 animation-discharging-0 =  @@ -717,7 +682,7 @@ for the JavaScript code in this tag. animation-discharging-2 =  animation-discharging-3 =  animation-discharging-4 =  -animation-discharging-foreground = ${colors.foreground} +animation-discharging-foreground = ${color.fg} animation-discharging-framerate = 750
    @@ -734,11 +699,10 @@ for the JavaScript code in this tag. interval = 5 thermal-zone = 0 warn-temperature = 70 -;; Temperature off one cpu core -hwmon-path = /sys/devices/platform/coretemp.0/hwmon/hwmon1/temp1_input +hwmon-path = /sys/devices/platform/coretemp.0/hwmon/hwmon2/temp1_input format = %{A1:$TERMINAL -e "watch sensors" &:}<ramp> <label>%{A} -format-underline = ${colors.background} +format-underline = ${colors.bg} format-warn = <ramp> <label-warn> format-warn-underline = ${colors.red} @@ -751,7 +715,7 @@ for the JavaScript code in this tag. ramp-2 =  ramp-3 =  ramp-4 =  -ramp-foreground = ${colors.foreground} +ramp-foreground = ${color.fg}
    @@ -765,7 +729,7 @@ for the JavaScript code in this tag. type = custom/script label-font = 2 -format-underline = ${colors.background} +format-underline = ${colors.bg} click-left = ~/.config/polybar/scripts/mail-open.sh format = <label> exec = ~/.config/polybar/scripts/mail-status.sh @@ -809,7 +773,7 @@ for the JavaScript code in this tag. type = custom/script label-font = 2 -format-underline = ${colors.background} +format-underline = ${colors.bg} click-left = ~/.config/polybar/scripts/redshift-toggle.sh format = <label> exec = ~/.config/polybar/scripts/redshift-status.sh @@ -854,7 +818,7 @@ for the JavaScript code in this tag.
    [module/nordvpn]
     type = custom/script
     
    -format-underline = ${colors.background}
    +format-underline = ${colors.bg}
     click-left = ~/.config/polybar/scripts/nordvpn-toggle.sh
     format = <label>
     exec = ~/.config/polybar/scripts/nordvpn-status.sh
    @@ -864,14 +828,15 @@ for the JavaScript code in this tag.
     
    -

    Nordvpn Status script

    +

    TODO Nordvpn Status script

    +
      +
    • [ ] Should check if there is a tmpfile, if there is not, run nordvpn status and create the tmpfile accordindly
    • +
    -
    vpnstatus=`nordvpn status`;
    +
    tmpfile="/tmp/vpnstatus";
     
    -if [[ ${vpnstatus} == *"Connected"* ]]; then
    -  # country=`nordvpn status | sed '/Country/!d ; s/Country: //'`
    -  # echo "%{F#859900}%{F-} $country";
    +if [ -f $tmpfile ] && grep -q "on" $tmpfile; then
       echo "%{F#859900}%{F-}";
     else
       echo "";
    @@ -885,12 +850,14 @@ for the JavaScript code in this tag.
     

    Nordvpn Toggle

    -
    if [[ $(nordvpn status) == *"Connected"* ]]; then
    -  nordvpn disconnect && dunstify --replace=23198 "VPN" "Disconnected";
    +
    tmpfile="/tmp/vpnstatus";
    +
    +if [ -f $tmpfile ] && grep -q "on" $tmpfile; then
    +  nordvpn disconnect && dunstify --replace=23198 "VPN" "Disconnected" && echo "off" > $tmpfile;
     else
       country=`cat ~/bin/nordvpn_countries.txt | sed 's/\s*\t\s*/ /g ; s/\s/\n/g ; s/_/ /g ; /^[a-zA-Z]/!d ; s/\(.*\)/\L\1/' | rofi -i -dmenu | sed 's/\s/_/g'`;
       dunstify --replace=23198 "VPN" "Connecting to $country...";
    -  nordvpn connect $country && dunstify --replace=23198 "VPN" "Connected to $country";
    +  nordvpn connect $country && dunstify --replace=23198 "VPN" "Connected to $country" && echo "on" > $tmpfile;
     fi
     
    @@ -898,6 +865,48 @@ for the JavaScript code in this tag.
    +
    +

    Packages

    +
    +
    +
    [module/packages]
    +type = custom/script
    +
    +format-underline = ${colors.bg}
    +click-left = ~/.config/polybar/scripts/packages-update.sh
    +format = <label>
    +exec = ~/.config/polybar/scripts/packages-status.sh
    +interval = 600
    +
    +
    +
    + +
    +

    Packages Status script

    +
    +
    +
    packagenb=`yay -Qu 2> /dev/null | wc -l`;
    +if [ "$packagenb" -eq "0" ]; then
    +  echo "";
    +else
    +  echo "%{F#859900}%{F-}";
    +fi
    +
    +
    +
    +
    + +
    +

    Packages Update

    +
    +
    +
    $TERMINAL -e "yay" &
    +
    +
    +
    +
    +
    +

    Dunst

    @@ -905,7 +914,7 @@ for the JavaScript code in this tag.
    [module/dunst]
     type = custom/script
     
    -format-underline = ${colors.background}
    +format-underline = ${colors.bg}
     click-left = ~/.config/polybar/scripts/dunst-toggle.sh
     format = <label>
     exec = ~/.config/polybar/scripts/dunst-status.sh
    @@ -963,7 +972,7 @@ for the JavaScript code in this tag.
     
    [module/lockscreen]
     type = custom/script
     
    -format-underline = ${colors.background}
    +format-underline = ${colors.bg}
     click-left = ~/.config/polybar/scripts/lockscreen-toggle.sh
     click-right = ~/scripts/lockscreen.sh
     format = <label>
    @@ -1162,13 +1171,13 @@ $BROWSER https://www.yahoo.com/news/weath
     interface = enp0s20f0u9u4
     
     label-connected = %local_ip%
    -label-connected-foreground = ${colors.foreground}
    +label-connected-foreground = ${color.fg}
     
     format-connected-prefix = " "
     format-connected = <label-connected>
     
     label-disconnected = ""
    -label-disconnected-foreground = ${colors.comments}
    +label-disconnected-foreground = ${colors.gray}
     
     format-disconnected = <label-disconnected>
     
    @@ -1177,13 +1186,13 @@ $BROWSER https://www.yahoo.com/news/weath
     interface = wlp2s0
     
     label-connected = %essid%
    -label-connected-foreground = ${colors.foreground}
    +label-connected-foreground = ${color.fg}
     
     format-connected-prefix = " "
     format-connected = <label-connected>
     
     label-disconnected = ""
    -label-disconnected-foreground = ${colors.comments}
    +label-disconnected-foreground = ${colors.gray}
     
     format-disconnected = <label-disconnected>
     
    @@ -1219,7 +1228,7 @@ killall -q polybar while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done # Launch Polybar, using default config location ~/.config/polybar/config -polybar top & +polybar top >>/tmp/polybar.log 2>&1 & # polybar bottom & echo "Polybar launched..." @@ -1247,7 +1256,7 @@ polybar top &

    Author: Dehaeze Thomas

    -

    Created: 2020-01-12 dim. 17:28

    +

    Created: 2020-03-01 dim. 22:50

    diff --git a/docs/qutebrowser.html b/docs/qutebrowser.html index e79d442..8b05e3b 100644 --- a/docs/qutebrowser.html +++ b/docs/qutebrowser.html @@ -4,7 +4,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Qutebrowser Configuration @@ -201,50 +201,28 @@ @@ -263,21 +241,12 @@ for the JavaScript code in this tag.
  • Content
  • Downloads
  • Fonts
  • -
  • Hints
  • Input
  • -
  • Keyhint
  • -
  • Messages
  • New Instance Options
  • -
  • Prompt
  • -
  • Qt
  • -
  • Scrolling
  • -
  • Search
  • -
  • Session
  • Spell Check
  • Status Bar
  • Tabs
  • Urls
  • -
  • Window
  • Bindings
    • Normal Mode @@ -295,10 +264,11 @@ for the JavaScript code in this tag.
    • Bindings for yesno mode
    • Custom Bindings
        +
      • Create a Password for the current website
      • Use Pass to fill password and username (configuration is done in ~/.config/qutebrowser/password_fill_rc).
      • Open Youtube video using MPV
      • -
      • Cast Youtube to Chromecast
      • -
      • Add url to refile.org
      • +
      • Cast Youtube to Chromecast
      • +
      • Add url to refile.org
      • Add page to Bookmarks
      • Open bookmark using buku
      • Org Capture
      • @@ -310,8 +280,9 @@ for the JavaScript code in this tag.
      • Userscripts
          -
        • Cast Youtube to Chromecast
        • -
        • Add url to refile.org
        • +
        • Create a new password
        • +
        • Cast Youtube to Chromecast
        • +
        • Add url to refile.org
        • Passwordfillrc
        • Org-Capture
        • Add Url to Buku using Rofi
        • @@ -338,28 +309,9 @@ import sys, os

          General config

          -
          # This is here so configs done via the GUI are still loaded.
          -# Remove it to not load settings done via the GUI.
          -# config.load_autoconfig()
          -
          -# Aliases for commands. The keys of the given dictionary are the
          -c.aliases = {'w': 'session-save', 'q': 'quit', 'wq': 'quit --save'}
          -
          -# Time interval (in milliseconds) between auto-saves of config/cookies/etc.
          -c.auto_save.interval = 15000
          -
          -# Always restore open sites when qutebrowser is reopened.
          +
          c.aliases = {'w': 'session-save', 'q': 'quit', 'wq': 'quit --save'}
           c.auto_save.session = False
          -
          -# Backend to use to display websites
           c.backend = 'webengine'
          -
          -# Require a confirmation before quitting the application.
          -# Valid values:
          -#   - always: Always show a confirmation.
          -#   - multiple-tabs: Show a confirmation if multiple tabs are opened.
          -#   - downloads: Show a confirmation if downloads are running
          -#   - never: Never show a confirmation.
           c.confirm_quit = ['downloads']
           
          @@ -370,31 +322,13 @@ import sys, os

          Content

          -
          # Automatically start playing `<video>` elements
          -c.content.autoplay = False
          -
          +
          c.content.autoplay = False
           c.content.notifications = False
          -
          -# Allow websites to request geolocations.
           c.content.geolocation = 'ask'
          -
          -# Show javascript alerts.
           c.content.javascript.alert = True
          -
          -# Allow JavaScript to read from or write to the clipboard
           c.content.javascript.can_access_clipboard = True
          -
          -# Allow websites to record audio/video.
           c.content.media_capture = 'ask'
          -
          -# Allow pdf.js to view PDF files in the browser
          -c.content.pdfjs = False
          -
          -# Proxy to use. In addition to the listed values, you can use a
          -# `socks://...` or `http://...` URL.
          -# Valid values:
          -#   - system: Use the system wide proxy.
          -#   - none: Don't use any proxy
          +c.content.pdfjs = True
           c.content.proxy = 'system'
           
          @@ -405,26 +339,11 @@ import sys, os

          Downloads

          -
          # Directory to save downloads to
          -c.downloads.location.directory = '$HOME/Downloads/'
          -
          -# Prompt the user for the download location
          +
          c.downloads.location.directory = '$HOME/Downloads/'
           c.downloads.location.prompt = True
          -
          -# Remember the last used download directory.
           c.downloads.location.remember = True
          -
          -# What to display in the download filename input.
          -# Valid values:
          -#   - path: Show only the download path.
          -#   - filename: Show only download filename.
          -#   - both: Show download path and filename.
           c.downloads.location.suggestion = 'path'
          -
          -# Where to show the downloaded files.
           c.downloads.position = 'bottom'
          -
          -# Duration (in milliseconds) to wait before removing finished downloads
           c.downloads.remove_finished = 10000
           
          @@ -435,151 +354,23 @@ import sys, os

          Fonts

          -
          # Default monospace fonts
          -c.fonts.monospace = '"Hack Nerd Font Mono" "xos4 Terminus", Terminus, Monospace, "DejaVu Sans Mono", Monaco, "Bitstream Vera Sans Mono", "Andale Mono", "Courier New", Courier, "Liberation Mono", monospace, Fixed, Consolas, Terminal'
          -
          -# Font used for prompts.
          +
          c.fonts.default_family = ["Hack Nerd Font Mono", "DejaVu Sans Mono", "Monaco"]
           c.fonts.prompts = '10pt monospace'
          -
          -# Font used in the statusbar.
           c.fonts.statusbar = '10pt monospace'
          -
          -# Font used in the tab bar.
           c.fonts.tabs = '10pt monospace'
           
          -
          -

          Hints

          -
          -
          -
          # When a hint can be automatically followed without pressing Enter.
          -# Valid values:
          -#   - always: Auto-follow whenever there is only a single hint on a page.
          -#   - unique-match: Auto-follow whenever there is a unique non-empty match in either the hint string (word mode) or filter (number mode).
          -#   - full-match: Follow the hint when the user typed the whole hint (letter, word or number mode) or the element's text (only in number mode).
          -#   - never: The user will always need to press Enter to follow a hint.
          -# c.hints.auto_follow = 'unique-match'
          -
          -# Duration (in milliseconds) to ignore normal-mode key bindings after a
          -# successful auto-follow.
          -# c.hints.auto_follow_timeout = 0
          -
          -# CSS border value for hints.
          -# c.hints.border = '1px solid #E3BE23'
          -
          -# Characters used for hint strings.
          -# c.hints.chars = 'asdfghjkl'
          -
          -# Dictionary file to be used by the word hints.
          -# c.hints.dictionary = '/usr/share/dict/words'
          -
          -# Which implementation to use to find elements to hint.
          -# Valid values:
          -#   - javascript: Better but slower
          -#   - python: Slightly worse but faster
          -# c.hints.find_implementation = 'python'
          -
          -# Hide unmatched hints in rapid mode.
          -# c.hints.hide_unmatched_rapid_hints = True
          -
          -# Minimum number of characters used for hint strings.
          -# c.hints.min_chars = 1
          -
          -# Mode to use for hints.
          -# Valid values:
          -#   - number: Use numeric hints. (In this mode you can also type letters from the hinted element to filter and reduce the number of elements that are hinted.)
          -#   - letter: Use the characters in the `hints.chars` setting.
          -#   - word: Use hints words based on the html elements and the extra words.
          -# c.hints.mode = 'letter'
          -
          -# Comma-separated list of regular expressions to use for 'next' links.
          -# c.hints.next_regexes = ['\\bnext\\b', '\\bmore\\b', '\\bnewer\\b', '\\b[>→≫]\\b', '\\b(>>|»)\\b', '\\bcontinue\\b']
          -
          -# Comma-separated list of regular expressions to use for 'prev' links.
          -# c.hints.prev_regexes = ['\\bprev(ious)?\\b', '\\bback\\b', '\\bolder\\b', '\\b[<←≪]\\b', '\\b(<<|«)\\b']
          -
          -# Scatter hint key chains (like Vimium) or not (like dwb). Ignored for
          -# number hints.
          -# c.hints.scatter = True
          -
          -# Make characters in hint strings uppercase.
          -# c.hints.uppercase = False
          -
          -
          -
          -
          -

          Input

          -
          # Enter insert mode if an editable element is clicked.
          -c.input.insert_mode.auto_enter = True
          -
          -# Leave insert mode if a non-editable element is clicked.
          +
          c.input.insert_mode.auto_enter = True
           c.input.insert_mode.auto_leave = True
          -
          -# Automatically enter insert mode if an editable element is focused
          -# after loading the page.
           c.input.insert_mode.auto_load = False
          -
          -# Switch to insert mode when clicking flash and other plugins.
          -# c.input.insert_mode.plugins = False
          -
          -# Include hyperlinks in the keyboard focus chain when tabbing.
          -# c.input.links_included_in_focus_chain = True
          -
          -# Timeout (in milliseconds) for partially typed key bindings. If the
          -# current input forms only partial matches, the keystring will be
          -# cleared after this time.
          -# c.input.partial_timeout = 5000
          -
          -# Enable Opera-like mouse rocker gestures. This disables the context
          -# menu.
          -# c.input.rocker_gestures = False
          -
          -# Enable spatial navigation. Spatial navigation consists in the ability
          -# to navigate between focusable elements in a Web page, such as
          -# hyperlinks and form controls, by using Left, Right, Up and Down arrow
          -# keys. For example, if the user presses the Right key, heuristics
          -# determine whether there is an element he might be trying to reach
          -# towards the right and which element he probably wants.
          -# c.input.spatial_navigation = False
          -
          -
          -
          -
          - -
          -

          Keyhint

          -
          -
          -
          # Keychains that shouldn't be shown in the keyhint dialog. Globs are
          -# supported, so `;*` will blacklist all keychains starting with `;`. Use
          -# `*` to disable keyhints.
          -# c.keyhint.blacklist = []
          -
          -# Time (in milliseconds) from pressing a key to seeing the keyhint
          -# dialog.
          -# c.keyhint.delay = 500
          -
          -# Rounding radius (in pixels) for the edges of the keyhint dialog.
          -# c.keyhint.radius = 6
          -
          -
          -
          -
          - -
          -

          Messages

          -
          -
          -
          # Duration (in milliseconds) to show messages in the statusbar for. Set
          -# to 0 to never clear messages.
          -# c.messages.timeout = 2000
          +c.input.insert_mode.plugins = True
           
          @@ -589,147 +380,8 @@ import sys, os

          New Instance Options

          -
          # How to open links in an existing instance if a new one is launched.
          -# This happens when e.g. opening a link from a terminal. See
          -# `new_instance_open_target_window` to customize in which window the
          -# link is opened in.
          -# Valid values:
          -#   - tab: Open a new tab in the existing window and activate the window.
          -#   - tab-bg: Open a new background tab in the existing window and activate the window.
          -#   - tab-silent: Open a new tab in the existing window without activating the window.
          -#   - tab-bg-silent: Open a new background tab in the existing window without activating the window.
          -#   - window: Open in a new window.
          -# c.new_instance_open_target = 'tab'
          -
          -# Which window to choose when opening links as new tabs. When
          -# `new_instance_open_target` is not set to `window`, this is ignored.
          -# Valid values:
          -#   - first-opened: Open new tabs in the first (oldest) opened window.
          -#   - last-opened: Open new tabs in the last (newest) opened window.
          -#   - last-focused: Open new tabs in the most recently focused window.
          -#   - last-visible: Open new tabs in the most recently visible window.
          -# c.new_instance_open_target_window = 'last-focused'
          -
          -
          -
          -
          - -
          -

          Prompt

          -
          -
          -
          # Show a filebrowser in upload/download prompts.
          -# c.prompt.filebrowser = True
          -
          -# Rounding radius (in pixels) for the edges of prompts.
          -# c.prompt.radius = 8
          -
          -
          -
          -
          - -
          -

          Qt

          -
          -
          -
          # Additional arguments to pass to Qt, without leading `--`. With
          -# QtWebEngine, some Chromium arguments (see
          -# https://peter.sh/experiments/chromium-command-line-switches/ for a
          -# list) will work.
          -# c.qt.args = []
          -
          -# Force a Qt platform to use. This sets the `QT_QPA_PLATFORM`
          -# environment variable and is useful to force using the XCB plugin when
          -# running QtWebEngine on Wayland.
          -# c.qt.force_platform = None
          -
          -# Force software rendering for QtWebEngine. This is needed for
          -# QtWebEngine to work with Nouveau drivers and can be useful in other
          -# scenarios related to graphic issues.
          -# Valid values:
          -#   - software-opengl: Tell LibGL to use a software implementation of GL (`LIBGL_ALWAYS_SOFTWARE` / `QT_XCB_FORCE_SOFTWARE_OPENGL`)
          -#   - qt-quick: Tell Qt Quick to use a software renderer instead of OpenGL. (`QT_QUICK_BACKEND=software`)
          -#   - chromium: Tell Chromium to disable GPU support and use Skia software rendering instead. (`--disable-gpu`)
          -#   - none: Don't force software rendering.
          -# c.qt.force_software_rendering = 'none'
          -
          -# Turn on Qt HighDPI scaling. This is equivalent to setting
          -# QT_AUTO_SCREEN_SCALE_FACTOR=1 in the environment. It's off by default
          -# as it can cause issues with some bitmap fonts. As an alternative to
          -# this, it's possible to set font sizes and the `zoom.default` setting.
          -# c.qt.highdpi = False
          -
          -# When to use Chromium's low-end device mode. This improves the RAM
          -# usage of renderer processes, at the expense of performance.
          -# Valid values:
          -#   - always: Always use low-end device mode.
          -#   - auto: Decide automatically (uses low-end mode with < 1 GB available RAM).
          -#   - never: Never use low-end device mode.
          -# c.qt.low_end_device_mode = 'auto'
          -
          -# Which Chromium process model to use. Alternative process models use
          -# less resources, but decrease security and robustness. See the
          -# following pages for more details:    -
          -# https://www.chromium.org/developers/design-documents/process-models
          -# - https://doc.qt.io/qt-5/qtwebengine-features.html#process-models
          -# Valid values:
          -#   - process-per-site-instance: Pages from separate sites are put into separate processes and separate visits to the same site are also isolated.
          -#   - process-per-site: Pages from separate sites are put into separate processes. Unlike Process per Site Instance, all visits to the same site will share an OS process. The benefit of this model is reduced memory consumption, because more web pages will share processes. The drawbacks include reduced security, robustness, and responsiveness.
          -#   - single-process: Run all tabs in a single process. This should be used for debugging purposes only, and it disables `:open --private`.
          -# c.qt.process_model = 'process-per-site-instance'
          -
          -
          -
          -
          - -
          -

          Scrolling

          -
          -
          -
          # When to show the scrollbar.
          -# Valid values:
          -#   - always: Always show the scrollbar.
          -#   - never: Never show the scrollbar.
          -#   - when-searching: Show the scrollbar when searching for text in the webpage. With the QtWebKit backend, this is equal to `never`.
          -# c.scrolling.bar = 'when-searching'
          -
          -# Enable smooth scrolling for web pages. Note smooth scrolling does not
          -# work with the `:scroll-px` command.
          -# c.scrolling.smooth = False
          -
          -
          -
          -
          - -
          -

          Search

          -
          -
          -
          # When to find text on a page case-insensitively.
          -# Valid values:
          -#   - always: Search case-insensitively.
          -#   - never: Search case-sensitively.
          -#   - smart: Search case-sensitively if there are capital characters.
          -# c.search.ignore_case = 'smart'
          -
          -# Find text on a page incrementally, renewing the search for each typed
          -# character.
          -# c.search.incremental = True
          -
          -
          -
          -
          - -
          -

          Session

          -
          -
          -
          # Name of the session to save by default. If this is set to null, the
          -# session which was last loaded is saved.
          -# c.session.default_name = None
          -
          -# Load a restored tab as soon as it takes focus.
          -# c.session.lazy_restore = False
          +
          c.new_instance_open_target = 'tab'
          +c.new_instance_open_target_window = 'last-focused'
           
          @@ -738,58 +390,6 @@ import sys, os

          Spell Check

          -

          -Languages to use for spell checking. You can check for available -languages and install dictionaries using scripts/dictcli.py. Run the -script with -h/–help for instructions. -Valid values: -

          -
            -
          • af-ZA: Afrikaans (South Africa)
          • -
          • bg-BG: Bulgarian (Bulgaria)
          • -
          • ca-ES: Catalan (Spain)
          • -
          • cs-CZ: Czech (Czech Republic)
          • -
          • da-DK: Danish (Denmark)
          • -
          • de-DE: German (Germany)
          • -
          • el-GR: Greek (Greece)
          • -
          • en-AU: English (Australia)
          • -
          • en-CA: English (Canada)
          • -
          • en-GB: English (United Kingdom)
          • -
          • en-US: English (United States)
          • -
          • es-ES: Spanish (Spain)
          • -
          • et-EE: Estonian (Estonia)
          • -
          • fa-IR: Farsi (Iran)
          • -
          • fo-FO: Faroese (Faroe Islands)
          • -
          • fr-FR: French (France)
          • -
          • he-IL: Hebrew (Israel)
          • -
          • hi-IN: Hindi (India)
          • -
          • hr-HR: Croatian (Croatia)
          • -
          • hu-HU: Hungarian (Hungary)
          • -
          • id-ID: Indonesian (Indonesia)
          • -
          • it-IT: Italian (Italy)
          • -
          • ko: Korean
          • -
          • lt-LT: Lithuanian (Lithuania)
          • -
          • lv-LV: Latvian (Latvia)
          • -
          • nb-NO: Norwegian (Norway)
          • -
          • nl-NL: Dutch (Netherlands)
          • -
          • pl-PL: Polish (Poland)
          • -
          • pt-BR: Portuguese (Brazil)
          • -
          • pt-PT: Portuguese (Portugal)
          • -
          • ro-RO: Romanian (Romania)
          • -
          • ru-RU: Russian (Russia)
          • -
          • sh: Serbo-Croatian
          • -
          • sk-SK: Slovak (Slovakia)
          • -
          • sl-SI: Slovenian (Slovenia)
          • -
          • sq: Albanian
          • -
          • sr: Serbian
          • -
          • sv-SE: Swedish (Sweden)
          • -
          • ta-IN: Tamil (India)
          • -
          • tg-TG: Tajik (Tajikistan)
          • -
          • tr-TR: Turkish (Turkey)
          • -
          • uk-UA: Ukrainian (Ukraine)
          • -
          • vi-VN: Vietnamese (Viet Nam)
          • -
          -
          c.spellcheck.languages = ['en-US', 'fr-FR']
           
          @@ -802,16 +402,8 @@ Valid values:
          # Hide the statusbar unless a message is shown.
          -# c.statusbar.hide = False
          -
          -# Padding (in pixels) for the statusbar.
          -# c.statusbar.padding = {'top': 1, 'bottom': 1, 'left': 0, 'right': 0}
          -
          -# Position of the status bar.
          -# Valid values:
          -#   - top
          -#   - bottom
          -# c.statusbar.position = 'bottom'
          +c.statusbar.hide = False
          +c.statusbar.position = 'bottom'
           
           # List of widgets displayed in the statusbar.
           # Valid values:
          @@ -822,7 +414,7 @@ Valid values:
           #   - tabs: Current active tab, e.g. `2`.
           #   - keypress: Display pressed keys when composing a vi command.
           #   - progress: Progress bar for the current page loading.
          -# c.statusbar.widgets = ['keypress', 'url', 'scroll', 'history', 'tabs', 'progress']
          +c.statusbar.widgets = ['keypress', 'url', 'scroll', 'history', 'progress']
           
          @@ -838,33 +430,9 @@ Valid values: # Mouse button with which to close tabs. c.tabs.close_mouse_button = 'right' -# How to behave when the close mouse button is pressed on the tab bar. -# Valid values: -# - new-tab: Open a new tab. -# - close-current: Close the current tab. -# - close-last: Close the last tab. -# - ignore: Don't do anything. -# c.tabs.close_mouse_button_on_bar = 'new-tab' - -# Width (in pixels) of the progress indicator (0 to disable). -# c.tabs.indicator.width = 3 - # How to behave when the last tab is closed. -# Valid values: -# - ignore: Don't do anything. -# - blank: Load a blank page. -# - startpage: Load the start page. -# - default-page: Load the default page. -# - close: Close the window. c.tabs.last_close = 'close' -# When switching tabs, what input mode is applied. -# Valid values: -# - persist: Retain the current mode. -# - restore: Restore previously saved mode. -# - normal: Always revert to normal mode. -# c.tabs.mode_on_change = 'normal' - # Switch between tabs using the mouse wheel. c.tabs.mousewheel_switching = False @@ -874,7 +442,7 @@ Valid values: # - next: After the current tab. # - first: At the beginning. # - last: At the end. -# c.tabs.new_position.related = 'next' +c.tabs.new_position.related = 'next' # Position of new tabs which aren't opened from another tab. # Valid values: @@ -882,13 +450,7 @@ Valid values: # - next: After the current tab. # - first: At the beginning. # - last: At the end. -# c.tabs.new_position.unrelated = 'last' - -# Padding (in pixels) around text for tabs. -# c.tabs.padding = {'top': 0, 'bottom': 0, 'left': 5, 'right': 5} - -# Shrink pinned tabs down to their contents. -# c.tabs.pinned.shrink = True +c.tabs.new_position.unrelated = 'last' # Position of the tab bar. c.tabs.position = 'left' @@ -896,19 +458,6 @@ Valid values: # Which tab to select when the focused tab is removed. c.tabs.select_on_remove = 'next' -# Format to use for the tab title. The following placeholders are -# defined: * `{perc}`: Percentage as a string like `[10%]`. * -# `{perc_raw}`: Raw percentage, e.g. `10`. * `{title}`: Title of the -# current web page. * `{title_sep}`: The string ` - ` if a title is set, -# empty otherwise. * `{index}`: Index of this tab. * `{id}`: Internal -# tab ID of this tab. * `{scroll_pos}`: Page scroll position. * -# `{host}`: Host of the current web page. * `{backend}`: Either -# ''webkit'' or ''webengine'' * `{private}`: Indicates when private mode -# is enabled. * `{current_url}`: URL of the current web page. * -# `{protocol}`: Protocol (http/https/...) of the current web page. * -# `{audio}`: Indicator for audio/mute status. -# c.tabs.title.format = '{audio}{index}: {title}' - # Width (in pixels or as percentage of the window) of the tab bar if it's vertical. c.tabs.width = 30 @@ -923,32 +472,7 @@ Valid values:

          Urls

          -
          # What search to start when something else than a URL is entered.
          -# Valid values:
          -#   - naive: Use simple/naive check.
          -#   - dns: Use DNS requests (might be slow!).
          -#   - never: Never search automatically.
          -# c.url.auto_search = 'naive'
          -
          -# URL segments where `:navigate increment/decrement` will search for a
          -# number.
          -# Valid values:
          -#   - host
          -#   - port
          -#   - path
          -#   - query
          -#   - anchor
          -# c.url.incdec_segments = ['path', 'query']
          -
          -# Search engines which can be used via the address bar. Maps a search
          -# engine name (such as `DEFAULT`, or `ddg`) to a URL with a `{}`
          -# placeholder. The placeholder will be replaced by the search term, use
          -# `{{` and `}}` for literal `{`/`}` signs. The search engine named
          -# `DEFAULT` is used when `url.auto_search` is turned on and something
          -# else than a URL was entered to be opened. Other search engines can be
          -# used by prepending the search engine name to the search term, e.g.
          -# `:open google qutebrowser`.
          -c.url.searchengines = {
          +
          c.url.searchengines = {
               'DEFAULT': 'https://www.duckduckgo.org/?q={}',
               'aw': 'https://wiki.archlinux.org/?search={}',
               'wi': 'https://en.wikipedia.org/wiki/Special:Search?search={}',
          @@ -965,29 +489,12 @@ Valid values:
               'md': 'https://fr.mathworks.com/help/search.html?qdoc={}&submitsearch=',
           }
           
          -# Page(s) to open at the start.
           c.url.start_pages = ['https://start.duckduckgo.com']
           
          -
          -

          Window

          -
          -
          -
          # Hide the window decoration.  This setting requires a restart on
          -# Wayland.
          -# c.window.hide_decoration = False
          -
          -# Format to use for the window title. The same placeholders like for
          -# `tabs.title.format` are defined.
          -# c.window.title_format = '{perc}{title}{title_sep}qutebrowser'
          -
          -
          -
          -
          -

          Bindings

          @@ -1369,6 +876,16 @@ config.bind('gr', 'open

          Custom Bindings

          +
          +

          Create a Password for the current website

          +
          +
          +
          config.bind(',P', 'spawn --userscript ~/.config/qutebrowser/userscripts/add-passowrd.sh')
          +
          +
          +
          +
          +

          Use Pass to fill password and username (configuration is done in ~/.config/qutebrowser/password_fill_rc).

          @@ -1391,9 +908,9 @@ config.bind(',M', 'hint
          -
          -

          Cast Youtube to Chromecast

          -
          +
          +

          Cast Youtube to Chromecast

          +
          config.bind(',c', 'spawn --userscript ~/.config/qutebrowser/userscripts/cast.sh {url}')
           config.bind(',C', 'hint links spawn --userscript ~/.config/qutebrowser/userscripts/cast.sh {hint-url}')
          @@ -1402,9 +919,9 @@ config.bind(',C', 'hint
           
          -
          -

          Add url to refile.org

          -
          +
          +

          Add url to refile.org

          +
          config.bind(',r', 'spawn --userscript ~/.config/qutebrowser/userscripts/add-to-orgmode-refile.sh')
           
          @@ -1462,7 +979,7 @@ config.bind(',R', 'hint

          See price in CamelCamelCamel

          -
          config.bind(',P', ":open -t https://fr.camelcamelcamel.com/search?sq={url}")
          +
          # config.bind(',P', ":open -t https://fr.camelcamelcamel.com/search?sq={url}")
           
          @@ -1474,9 +991,27 @@ config.bind(',R', 'hint

          Userscripts

          -
          -

          Cast Youtube to Chromecast

          -
          +
          +

          Create a new password

          +
          +
          +
          url=$(echo "$QUTE_URL" | awk -F[/:] '{print $4}' | rofi -p "URL" -dmenu -lines 1)
          +username=$(echo "dehaeze.thomas@gmail.com\nthomas.dehaeze@esrf.fr\ntdehaeze" | rofi -p "Username" -dmenu -lines 5)
          +password=$(rofi -p "Password" -dmenu -password -lines 1)
          +
          +echo "$password\nlogin: $username\nurl: $QUTE_URL" > /tmp/add-password.txt
          +
          +pass insert --multiline "$url/$username" < /tmp/add-password.txt
          +
          +rm /tmp/add-password.txt
          +
          +
          +
          +
          + +
          +

          Cast Youtube to Chromecast

          +
          youtube-dl -o - $1 | castnow --quiet -
           
          @@ -1484,9 +1019,9 @@ config.bind(',R', 'hint
          -
          -

          Add url to refile.org

          -
          +
          +

          Add url to refile.org

          +

          Add the date and time of add to properties.

          @@ -1526,6 +1061,7 @@ Add the date and time of add to properties.
          +

          Org-Capture

          @@ -1546,6 +1082,7 @@ Add the date and time of add to properties.
          +

          Add Url to Buku using Rofi

          @@ -1562,7 +1099,7 @@ buku --add "

          Author: Dehaeze Thomas

          -

          Created: 2020-01-11 sam. 22:19

          +

          Created: 2020-03-01 dim. 22:50

          diff --git a/docs/ranger.html b/docs/ranger.html index a725243..f04cbaa 100644 --- a/docs/ranger.html +++ b/docs/ranger.html @@ -4,7 +4,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Ranger Configuration @@ -201,50 +201,28 @@ @@ -274,7 +252,11 @@ for the JavaScript code in this tag.
        • Compress Script
      • -
      • Delete first page of pdf
      • +
      • Delete first page of pdf + +
      • Convert PDF to PNG
      • Magit Status
      • Upload with 0x0 (previously Tansfer.sh) @@ -284,60 +266,38 @@ for the JavaScript code in this tag.
      • Open current folder with PCManFM
      • Open with Emacs
      • +
      • Print on Rnice
    • Define keys for the browser
    • Define keys for the console -
    • -
    • Pager Keybindings - -
    • -
    • Taskview Keybindings -
    @@ -367,13 +327,11 @@ for the JavaScript code in this tag. # multipane: Midnight-commander like multipane view showing all tabs next # to each other set viewmode miller -#set viewmode multipane # How many columns are there, and what are their relative widths? set column_ratios 1,1 # Which files should be hidden? (regular expression) -#set hidden_filter ^\.|\.(?:pyc|pyo|bak|swp)$|^lost\+found$|^__(py)?cache__$ set hidden_filter ^\.|\.(?:pyc|vrb|pyo|lof|bak|swp|aux|log|nav|out|snm|toc|bcf|run\.xml|synctex\.gz|blg|bbl)$|^lost\+found$|^__(py)?cache__$ # Show hidden files? You can toggle this by typing 'zh' @@ -387,7 +345,7 @@ set confirm_on_delete multiple # Which script is used to generate file previews? # ranger ships with scope.sh, a script that calls external programs (see # README.md for dependencies) to preview images, archives, etc. -set preview_script ~/.config/ranger/scope.sh +set preview_script /home/thomas/.config/ranger/scope.sh # Use the external preview script or display simple plain text or image previews? set use_preview_script true @@ -396,35 +354,17 @@ set use_preview_script true set automatically_count_files true # Open all images in this directory when running certain image viewers -# like feh or sxiv? You can still open selected files by marking them. -# TODO set open_all_images true # Be aware of version control systems and display information. set vcs_aware false -# State of the three backends git, hg, bzr. The possible states are -# disabled, local (only show local info), enabled (show local and remote -# information). -set vcs_backend_git enabled -set vcs_backend_hg disabled -set vcs_backend_bzr disabled - # Use one of the supported image preview protocols set preview_images true # Set the preview image method -# TODO set preview_images_method w3m -# Use a unicode "..." character to mark cut-off filenames? -set unicode_ellipsis false - -# Show dotfiles in the bookmark preview box? -set show_hidden_bookmarks true - -# Which colorscheme to use? These colorschemes are available by default: -# default, jungle, snow, solarized set colorscheme default # Preview files on the rightmost column? @@ -433,9 +373,6 @@ set preview_files true set preview_directories true set collapse_preview true -# Save the console history on exit? -set save_console_history false - # Draw the status bar on top of the browser window (default: bottom) set status_bar_on_top false @@ -454,16 +391,16 @@ set mouse_enabled true # Display the file size in the main column or status bar? set display_size_in_main_column true -set display_size_in_status_bar true +set display_size_in_status_bar false # Display files tags in all columns or only in main column? -set display_tags_in_all_columns true +set display_tags_in_all_columns false # Set a title for the window? set update_title false # Set the title to "ranger" in the tmux program? -set update_tmux_title false +set update_tmux_title true # Shorten the title if it gets long? The number defines how many # directories are displayed at once, 0 turns off this feature. @@ -486,16 +423,7 @@ set flushinput true # This allows you to click into the space to run the file. set padding_right true -# Save bookmarks (used with mX and `X) instantly? -# This helps to synchronize bookmarks between multiple ranger -# instances but leads to *slight* performance loss. -# When false, bookmarks are saved when ranger is exited. set autosave_bookmarks false - -# You can display the "real" cumulative size of directories by using the -# command :get_cumulative_size or typing "dc". The size is expensive to -# calculate and will not be updated automatically. You can choose -# to update it automatically though by turning on this option: set autoupdate_cumulative_size false # Turning this on makes sense for screen readers: @@ -519,7 +447,7 @@ set cd_bookmarks false # Avoid previewing files larger than this size, in bytes. Use a value of 0 to # disable this feature. -set preview_max_size 0 +set preview_max_size 5000000 # Add the highlighted file to the path in the titlebar set show_selection_in_titlebar true @@ -548,12 +476,7 @@ set line_numbers false

    Command Aliases in the Console

    -
    alias e    edit
    -alias q    quit
    -alias q!   quitall
    -alias qa   quitall
    -alias qall quitall
    -alias setl setlocal
    +
    alias q    quit
     
     alias filter     scout -prt
     alias find       scout -aeit
    @@ -575,8 +498,7 @@ alias travel     scout -aefiklst
     

    Extract

    -
    # map ,x shell atool -x %f
    -map ,x shell ~/.config/ranger/scripts/extract.sh %f
    +
    map ,x shell ~/.config/ranger/scripts/extract.sh %f
     
    @@ -600,8 +522,7 @@ map ,x shell ~/.config/ranger/scripts/extract.sh %f

    Compress

    -
    # map ,z shell apack %f.zip %f
    -map ,z shell ~/.config/ranger/scripts/compress.sh %f
    +
    map ,z shell ~/.config/ranger/scripts/compress.sh %f
     
    @@ -626,10 +547,33 @@ map ,z shell ~/.config/ranger/scripts/compress.sh %f

    Delete first page of pdf

    -
    map ,d shell ~/scripts/pdf-delete-first-page.sh %f
    +
    map ,d shell ~/.config/ranger/scripts/pdf-delete-first-page.sh %f
     
    + +
    +
    Delete first page of PDF
    +
    +

    +The requirement is to have pdftk or stapler installed. +

    + +
    +
    if [[ -f $1 && $1 == *.pdf ]]; then
    +    # Argument if a file
    +    if type stapler > /dev/null 2>&1; then
    +        stapler del "$1" 1 /tmp/pdftk_out.pdf && mv /tmp/pdftk_out.pdf "$1"
    +    elif type pdftk > /dev/null 2>&1; then
    +        pdftk "$1" cat 2-end output /tmp/pdftk_out.pdf && mv /tmp/pdftk_out.pdf "$1"
    +    else
    +        echo "Neither pdftk nor stapler are installed"
    +    fi
    +fi
    +
    +
    +
    +
    @@ -656,8 +600,7 @@ map ,z shell ~/.config/ranger/scripts/compress.sh %f

    Upload with 0x0 (previously Tansfer.sh)

    -
    # map ,t shell curl --progress-bar --upload-file %f https://transfer.sh/$(basename $1) | xclip -in -selection clipboard;
    -map ,t shell ~/.config/ranger/scripts/upload.sh %f
    +
    map ,t shell ~/.config/ranger/scripts/upload.sh %f
     
    @@ -696,37 +639,56 @@ map ,t shell ~/.config/ranger/scripts/upload.sh %f
  • + +
    +

    Print on Rnice

    +
    +
    +
    map ,p shell print-rnice %f &
    +
    +
    +
    +

    Define keys for the browser

    -
    -

    Basic

    -
    +
    +

    Basic

    +
    -
    map     Q quit!
    -map     q eval fm.execute_console("shell tmux detach") if 'TMUX' in os.environ.keys() else fm.execute_console("quit")
    -copymap q ZZ ZQ
    +
    map Q quit!
    +map q eval fm.execute_console("shell tmux detach") if 'TMUX' in os.environ.keys() else fm.execute_console("quit")
    +
    +
    -map R reload_cwd -map <C-r> reset -map <C-l> redraw_window -map <C-c> abort +
    +
    map <C-c> abort
     map <esc> change_mode normal
     map ~ set viewmode!
    +
    +
    -map i display_file -map ? help -map W display_log -map w taskview_open +
    +
    map ? help
    +
    +
    -map : console +
    +
    map : console
     map ; console
    -map ! console shell%space
    -map @ console -p6 shell  %%s
    -map # console shell -p%space
    +
    +
    + +
    +
    map ! console shell%space
    +
    +
    + +
    +
    map @ console -p6 shell  %%s
     
    @@ -737,20 +699,17 @@ map # conso
    map s shell $SHELL
    -# Open External Shell in current directory
     map S shell nohup $TERMINAL &
    -
    -map r chain draw_possible_programs; console open_with%%space
     
    -
    -

    Print on Rnice

    -
    +
    +

    Open With

    +
    -
    map ,p shell print-rnice %f &
    +
    map O chain draw_possible_programs; console open_with%space
     
    @@ -768,32 +727,12 @@ map F filter
    -
    -

    Change the line mode

    -
    -
    -
    map Mf linemode filename
    -map Mi linemode fileinfo
    -map Mm linemode mtime
    -map Mp linemode permissions
    -map Ms linemode sizemtime
    -map Mt linemode metatitle
    -
    -
    -
    -
    -

    Tagging / Marking

    -
    map t       tag_toggle
    -map ut      tag_remove
    -map <Space> mark_files toggle=True
    +
    map <Space> mark_files toggle=True
     map v       mark_files all=True toggle=True
    -map uv      mark_files all=True val=False
    -map V       toggle_visual_mode
    -map uV      toggle_visual_mode reverse=True
     
    @@ -809,8 +748,6 @@ copymap <LEFT> h copymap <RIGHT> l copymap <HOME> gg copymap <END> G -copymap <PAGEDOWN> <C-F> -copymap <PAGEUP> <C-B>
    @@ -822,21 +759,32 @@ copymap <PAGEUP> <C-B>
    map H     history_go -1
     map L     history_go 1
    -map ]     move_parent 1
    +
    +
    + +
    +
    map ]     move_parent 1
     map [     move_parent -1
    -map }     traverse
    +
    +
    + +
    +
    map }     traverse
    +
    +
    + +
    +
    map cd console cd%space
     
    -

    TODO Go to special folders

    +

    Go to special folders

    -
    map cd console cd%space
    -
    -map gh cd ~
    +
    map gh cd ~
     map ga cd ~/Cloud/administratif
     map gm cd ~/Cloud/thesis
     map gp cd ~/Pictures
    @@ -848,29 +796,6 @@ map gc cd ~/.config/literate-dotfiles
     
    -
    -

    TODO Open With

    -
    -

    -Should automatically close mimeopen after the program is chosen. -

    -
    -
    map O shell mimeopen -a %f
    -
    -
    -
    -
    - -
    -

    External Programs

    -
    -
    -
    map E edit
    -
    -
    -
    -
    -

    Get size of folders

    @@ -899,16 +824,6 @@ map yn shell -f echo -n %f | xsel -i; xsel -o | xsel -i -b
    -
    -

    Filesystem Operations

    -
    -
    -
    map = chmod
    -
    -
    -
    -
    -

    Drag and Drop

    @@ -919,22 +834,12 @@ map yn shell -f echo -n %f | xsel -i; xsel -o | xsel -i -b
    -
    -

    TODO Rename

    -
    -
    -
    #map cw console rename%space
    -map cw eval fm.execute_console("bulkrename") if fm.thisdir.marked_items else fm.open_console("rename ")
    -
    -
    -
    -
    - -
    -

    Rename files - like vim bindings

    -
    +
    +

    Rename files

    +
    map a  rename_append
    +map C  eval fm.execute_console("bulkrename") if fm.thisdir.marked_items else fm.open_console("rename ")
     map A  eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%"))
     map I  eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%"), position=7)
     
    @@ -965,10 +870,7 @@ map pht paste_hardlinked_subtree
    map dD shell -s trash-put %s
     map dd cut
    -map ud uncut
    -map da cut mode=add
    -map dr cut mode=remove
    -map dt cut mode=toggle
    +map du uncut
     
    @@ -979,27 +881,7 @@ map ud uncut
    map yy copy
    -map uy uncut
    -map ya copy mode=add
    -map yr copy mode=remove
    -map yt copy mode=toggle
    -
    -
    -
    -
    - -
    -

    Temporary workarounds

    -
    -
    -
    map dgg eval fm.cut(dirarg=dict(to=0), narg=quantifier)
    -map dG  eval fm.cut(dirarg=dict(to=-1), narg=quantifier)
    -map dj  eval fm.cut(dirarg=dict(down=1), narg=quantifier)
    -map dk  eval fm.cut(dirarg=dict(up=1), narg=quantifier)
    -map ygg eval fm.copy(dirarg=dict(to=0), narg=quantifier)
    -map yG  eval fm.copy(dirarg=dict(to=-1), narg=quantifier)
    -map yj  eval fm.copy(dirarg=dict(down=1), narg=quantifier)
    -map yk  eval fm.copy(dirarg=dict(up=1), narg=quantifier)
    +map yu uncut
     
    @@ -1012,12 +894,6 @@ map uy uncut
    map /  console search%space
     map n  search_next
     map N  search_next forward=False
    -map ct search_next order=tag
    -map cs search_next order=size
    -map ci search_next order=mimetype
    -map cc search_next order=ctime
    -map cm search_next order=mtime
    -map ca search_next order=atime
     
    @@ -1029,52 +905,12 @@ map n search_next
    map <C-n>     tab_new ~
     map <C-w>     tab_close
    +
     map <TAB>     tab_move 1
     map <S-TAB>   tab_move -1
    -map <A-Right> tab_move 1
    -map <A-Left>  tab_move -1
    -map gt        tab_move 1
    +
     map gn        tab_new ~
    -map uq        tab_restore
    -map <a-1>     tab_open 1
    -map <a-2>     tab_open 2
    -map <a-3>     tab_open 3
    -map <a-4>     tab_open 4
    -map <a-5>     tab_open 5
    -map <a-6>     tab_open 6
    -map <a-7>     tab_open 7
    -map <a-8>     tab_open 8
    -map <a-9>     tab_open 9
    -
    -
    -
    -
    - -
    -

    Sorting

    -
    -
    -
    map or set sort_reverse!
    -map oz set sort=random
    -map os chain set sort=size;      set sort_reverse=False
    -map ob chain set sort=basename;  set sort_reverse=False
    -map on chain set sort=natural;   set sort_reverse=False
    -map om chain set sort=mtime;     set sort_reverse=False
    -map oc chain set sort=ctime;     set sort_reverse=False
    -map oa chain set sort=atime;     set sort_reverse=False
    -map ot chain set sort=type;      set sort_reverse=False
    -map oe chain set sort=extension; set sort_reverse=False
    -
    -map oS chain set sort=size;      set sort_reverse=True
    -map oB chain set sort=basename;  set sort_reverse=True
    -map oN chain set sort=natural;   set sort_reverse=True
    -map oM chain set sort=mtime;     set sort_reverse=True
    -map oC chain set sort=ctime;     set sort_reverse=True
    -map oA chain set sort=atime;     set sort_reverse=True
    -map oT chain set sort=type;      set sort_reverse=True
    -map oE chain set sort=extension; set sort_reverse=True
    -
    -map dc get_cumulative_size
    +map gt        tab_move 1
     
    @@ -1084,19 +920,10 @@ map dc get_cumulative_size

    Settings

    -
    map zc    set collapse_preview!
    -map zd    set sort_directories_first!
    -map zh    set show_hidden!
    -map <C-h> set show_hidden!
    -map zI    set flushinput!
    +
    map zh    set show_hidden!
    +
     map zi    set preview_images!
    -map zm    set mouse_enabled!
    -map zp    set preview_files!
    -map zP    set preview_directories!
    -map zs    set sort_case_insensitive!
    -map zu    set autoupdate_cumulative_size!
     map zv    set use_preview_script!
    -map zf    console filter%space
     
    @@ -1118,44 +945,24 @@ map '<any> enter_bookmark %any
    -
    -

    Custom Mapping

    -
    +
    +

    FZF

    +
    map <C-f> fzf_select
     
    - -
    -

    Generate all the chmod bindings with some python help:

    -
    -
    -
    eval for arg in "rwxXst": cmd("map +u{0} shell -f chmod u+{0} %s".format(arg))
    -eval for arg in "rwxXst": cmd("map +g{0} shell -f chmod g+{0} %s".format(arg))
    -eval for arg in "rwxXst": cmd("map +o{0} shell -f chmod o+{0} %s".format(arg))
    -eval for arg in "rwxXst": cmd("map +a{0} shell -f chmod a+{0} %s".format(arg))
    -eval for arg in "rwxXst": cmd("map +{0}  shell -f chmod u+{0} %s".format(arg))
    -
    -eval for arg in "rwxXst": cmd("map -u{0} shell -f chmod u-{0} %s".format(arg))
    -eval for arg in "rwxXst": cmd("map -g{0} shell -f chmod g-{0} %s".format(arg))
    -eval for arg in "rwxXst": cmd("map -o{0} shell -f chmod o-{0} %s".format(arg))
    -eval for arg in "rwxXst": cmd("map -a{0} shell -f chmod a-{0} %s".format(arg))
    -eval for arg in "rwxXst": cmd("map -{0}  shell -f chmod u-{0} %s".format(arg))
    -
    -
    -
    -

    Define keys for the console

    -
    -

    Basic

    -
    +
    +

    Basic

    +
    cmap <tab>   eval fm.ui.console.tab()
     cmap <s-tab> eval fm.ui.console.tab(-1)
    @@ -1180,8 +987,6 @@ cmap <down>  eval fm.ui.console.history_move(cmap <right> eval fm.ui.console.move(right=1)
     cmap <home>  eval fm.ui.console.move(right=0, absolute=True)
     cmap <end>   eval fm.ui.console.move(right=-1, absolute=True)
    -cmap <a-left>   eval fm.ui.console.move_word(left=1)
    -cmap <a-right>  eval fm.ui.console.move_word(right=1)
     
    @@ -1194,148 +999,9 @@ cmap <down> eval fm.ui.console.history_move(cmap <backspace> eval fm.ui.console.delete(-1) cmap <delete> eval fm.ui.console.delete(0) cmap <C-w> eval fm.ui.console.delete_word() -cmap <A-d> eval fm.ui.console.delete_word(backward=False) -cmap <C-k> eval fm.ui.console.delete_rest(1) -cmap <C-u> eval fm.ui.console.delete_rest(-1) cmap <C-y> eval fm.ui.console.paste() - -
    -
    -
    - -
    -

    And of course the emacs way

    -
    -
    -
    copycmap <up>        <C-p>
    -copycmap <down>      <C-n>
    -copycmap <left>      <C-b>
    -copycmap <right>     <C-f>
     copycmap <home>      <C-a>
     copycmap <end>       <C-e>
    -copycmap <delete>    <C-d>
    -copycmap <backspace> <C-h>
    -
    -
    -
    -
    - -
    -

    Others

    -
    -
    -
    # Note: There are multiple ways to express backspaces.  <backspace> (code 263)
    -# and <backspace2> (code 127).  To be sure, use both.
    -copycmap <backspace> <backspace2>
    -
    -# This special expression allows typing in numerals:
    -cmap <allow_quantifiers> false
    -
    -
    -
    -
    -
    - -
    -

    Pager Keybindings

    -
    -
    -
    -

    Movement

    -
    -
    -
    pmap  <down>      pager_move  down=1
    -pmap  <up>        pager_move  up=1
    -pmap  <left>      pager_move  left=4
    -pmap  <right>     pager_move  right=4
    -pmap  <home>      pager_move  to=0
    -pmap  <end>       pager_move  to=-1
    -pmap  <pagedown>  pager_move  down=1.0  pages=True
    -pmap  <pageup>    pager_move  up=1.0    pages=True
    -pmap  <C-d>       pager_move  down=0.5  pages=True
    -pmap  <C-u>       pager_move  up=0.5    pages=True
    -
    -copypmap <UP>       k  <C-p>
    -copypmap <DOWN>     j  <C-n> <CR>
    -copypmap <LEFT>     h
    -copypmap <RIGHT>    l
    -copypmap <HOME>     g
    -copypmap <END>      G
    -copypmap <C-d>      d
    -copypmap <C-u>      u
    -copypmap <PAGEDOWN> n  f  <C-F>  <Space>
    -copypmap <PAGEUP>   p  b  <C-B>
    -
    -
    -
    -
    - -
    -

    Basic

    -
    -
    -
    pmap     <C-l> redraw_window
    -pmap     <ESC> pager_close
    -copypmap <ESC> q Q i <F3>
    -pmap E      edit_file
    -
    -
    -
    -
    -
    - -
    -

    Taskview Keybindings

    -
    -
    -
    -

    Movement

    -
    -
    -
    tmap <up>        taskview_move up=1
    -tmap <down>      taskview_move down=1
    -tmap <home>      taskview_move to=0
    -tmap <end>       taskview_move to=-1
    -tmap <pagedown>  taskview_move down=1.0  pages=True
    -tmap <pageup>    taskview_move up=1.0    pages=True
    -tmap <C-d>       taskview_move down=0.5  pages=True
    -tmap <C-u>       taskview_move up=0.5    pages=True
    -
    -copytmap <UP>       k  <C-p>
    -copytmap <DOWN>     j  <C-n> <CR>
    -copytmap <HOME>     g
    -copytmap <END>      G
    -copytmap <C-u>      u
    -copytmap <PAGEDOWN> n  f  <C-F>  <Space>
    -copytmap <PAGEUP>   p  b  <C-B>
    -
    -
    -
    -
    - -
    -

    Changing priority and deleting tasks

    -
    -
    -
    tmap J          eval -q fm.ui.taskview.task_move(-1)
    -tmap K          eval -q fm.ui.taskview.task_move(0)
    -tmap dd         eval -q fm.ui.taskview.task_remove()
    -tmap <pagedown> eval -q fm.ui.taskview.task_move(-1)
    -tmap <pageup>   eval -q fm.ui.taskview.task_move(0)
    -tmap <delete>   eval -q fm.ui.taskview.task_remove()
    -
    -
    -
    -
    - -
    -

    Basic

    -
    -
    -
    tmap <C-l> redraw_window
    -tmap <ESC> taskview_close
    -copytmap <ESC> q Q w <C-c>
    -default_linemode devicons
     
    @@ -1416,14 +1082,14 @@ default_linemode devicons #------------------------------------------- # Misc #------------------------------------------- +ext org = emacsclient -c "$1" + # Define the "editor" for text files as first action mime ^text, label editor = $EDITOR -- "$@" mime ^text, label pager = "$PAGER" -- "$@" !mime ^text, label editor, ext xml|json|csv|tex|py|pl|rb|js|sh|php = $EDITOR -- "$@" !mime ^text, label pager, ext xml|json|csv|tex|py|pl|rb|js|sh|php = "$PAGER" -- "$@" -ext org = emacsclient -create-frame --alternate-editor="" -n "$1" - ext 1 = man "$1" ext s[wmf]c, has zsnes, X = zsnes "$1" ext s[wmf]c, has snes9x-gtk,X = snes9x-gtk "$1" @@ -1612,7 +1278,7 @@ label wallpaper, number 14, mi

    Author: Dehaeze Thomas

    -

    Created: 2020-01-28 mar. 21:32

    +

    Created: 2020-03-01 dim. 22:50

    diff --git a/docs/rofi.html b/docs/rofi.html index e61842d..f8d2c7f 100644 --- a/docs/rofi.html +++ b/docs/rofi.html @@ -4,7 +4,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Rofi Configuration @@ -201,50 +201,28 @@ @@ -510,7 +488,7 @@ element.normal.urgent,

    Author: Dehaeze Thomas

    -

    Created: 2020-01-11 sam. 22:19

    +

    Created: 2020-03-01 dim. 22:50

    diff --git a/docs/scripts.html b/docs/scripts.html index e4ae367..cf99360 100644 --- a/docs/scripts.html +++ b/docs/scripts.html @@ -4,7 +4,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Scripts @@ -201,50 +201,28 @@ @@ -259,23 +237,12 @@ for the JavaScript code in this tag.
    @@ -294,12 +261,8 @@ for the JavaScript code in this tag.
    -

    TODO LockScreen

    +

    LockScreen

    -
      -
    • [ ] Does not work well with multiple screen
    • -
    -

    First, turn off dunst

    @@ -336,7 +299,7 @@ convert $temp_file -scale 10% -scale 1000 Finally, lock the screen using i3lock.

    -
    i3lock -e -n -i $temp_file && killall -SIGUSR2 dunst && echo "on" > /tmp/dunststatus
    +
    i3lock --no-unlock-indicator --ignore-empty-password --nofork --image=$temp_file && killall -SIGUSR2 dunst && echo "on" > /tmp/dunststatus
     
    @@ -377,29 +340,6 @@ revert
    -
    -

    Delete first page of PDF

    -
    -

    -The requirement is to have pdftk or stapler installed. -

    - -
    -
    if [[ -f $1 && $1 == *.pdf ]]; then
    -    # Argument if a file
    -    if type stapler > /dev/null 2>&1; then
    -        stapler del "$1" 1 /tmp/pdftk_out.pdf && mv /tmp/pdftk_out.pdf "$1"
    -    elif type pdftk > /dev/null 2>&1; then
    -        pdftk "$1" cat 2-end output /tmp/pdftk_out.pdf && mv /tmp/pdftk_out.pdf "$1"
    -    else
    -        echo "Neither pdftk nor stapler are installed"
    -    fi
    -fi
    -
    -
    -
    -
    -

    Lock / Exit / Suspend / …

    @@ -426,62 +366,10 @@ The requirement is to have pdftk or stapler installed.
    -
    -

    TODO Copy Figures

    -
    -

    -Things to do: -

    -
      -
    • [ ] Display all the figures at once and ask for confirmation to copy them all
    • -
    • [ ] Display the not found figures
    • -
    -
    -
    latexpath="$HOME/Cloud/thesis/latex/ressources/Figures";
    -
    -figures=`awk 'match($0, /(fig.*\.(png|svg|pdf))/, a) {print a[1];}' $1 \
    -      | awk '{ print gensub(/\s*\]\]\s*\|\s*\[\[\s*\.?\/?/, "\n", "g") }'`;
    -
    -for figure in $figures
    -do
    -    figurename=`echo $figure | awk 'match($0, /(fig.*\/)(.*\.(png|svg|pdf))/, a) {print a[2];}'`;
    -    if [ -f $latexpath/$figurename ]
    -    then
    -        figurepath=`echo $figure | awk 'match($0, /(fig.*)\/(.*\.(png|svg|pdf))/, a) {print a[1];}'`;
    -
    -        # echo $latexpath/$figurename
    -        # echo $figurepath/$figurename
    -        cp $latexpath/$figurename $figurepath/$figurename
    -
    -        # read -r -p "Are You Sure? [Y/n] " input
    -
    -        # case $input in
    -        #     [yY][eE][sS]|[yY])
    -        #         cp $latexpath/$figurename $figurepath/$figurename
    -        #         ;;
    -        #     [nN][oO]|[nN])
    -        #         exit 1
    -        #         ;;
    -        #     *)
    -        #         echo "Invalid input..."
    -        #         exit 1
    -        #         ;;
    -        # esac
    -    fi
    -done
    -
    -
    -
    -
    - -
    -

    NAS

    -
    -
    -
    -

    Mount

    -
    +
    +

    NAS - Mount

    +
    if [ $1 == "mount" ]; then
         if sudo -A mount 192.168.1.2:/volume1/Downloads/ /mnt/NAS/; then
    @@ -500,102 +388,32 @@ Things to do:
     
    -
    -
    -

    Buku Git Push

    -
    -
    -
    cd ~/.local/share/buku/
     
    -if [[ ! -z $(git status -s bookmarks.db) ]]
    -then
    -    git add bookmarks.db
    -    git commit -m "Changed bookmarks - $(date +%F)"
    -    git push
    -    dunstify --replace=79248 "Buku Git" "Updated"
    -    exit
    -fi
    -
    -
    -
    -

    Icons Unicode

    -
    command -v xclip >/dev/null 2>&1 || { echo >&2 "I require xclip but it's not installed.  Aborting."; exit 1; }
    +
    # The famous "get a menu of emojis to copy" script.
     
    -chosen=$(grep -v "#" ~/.config/emoji | dmenu -i -l 20)
    +# Must have xclip installed to even show menu.
    +xclip -h 2>/dev/null || exit 1
    +
    +chosen=$(cut -d ';' -f1 ~/.local/share/emoji | rofi -dmenu -i -l 20 | sed "s/ .*//")
     
     [ "$chosen" != "" ] || exit
     
    -c=$(echo "$chosen" | sed "s/ .*//")
    -echo "$c" | tr -d '\n' | xclip -selection clipboard
    -dunstify --replace=05896 "'$c' copied to clipboard." &
    -
    -
    -
    -
    - -
    -

    Make GIF

    -
    -

    -http://blog.pkh.me/p/21-high-quality-gif-with-ffmpeg.html -

    - -
    -
    palette="/tmp/palette.png"
    -
    -filters="fps=15,scale=320:-1:flags=lanczos"
    -
    -ffmpeg -v warning -i $1 -vf "$filters,palettegen" -y $palette
    -ffmpeg -v warning -i $1 -i $palette -lavfi "$filters [x]; [x][1:v] paletteuse" -y $2
    -
    -
    -
    -
    - -
    -

    Org-Capture

    -
    -
    -
    xclip -o -selection primary | xclip -o -selection clipboard -i
    -emacsclient -ne '(org-capture "" "Q")' && dunstify "Emacs" "Text Successfully Captured"
    -
    -
    -
    -
    - -
    -

    Download-Audio

    -
    -
    -
    if [ $TMUX ]; then
    -    tmux split -v -l 1 "cd ~/Downloads/ && youtube-dl --add-metadata -xic -f bestaudio/best $1" && tmux select-pane -U
    +# If you run this command with an argument, it will automatically insert the character.
    +if [ -n "$1" ]; then
    +    xdotool key Shift+Insert
     else
    -    cd ~/Downloads/;
    -    setsid nohup youtube-dl --add-metadata -xic -f bestaudio/best $1 &> /dev/null &
    +    echo "$chosen" | tr -d '\n' | xclip -selection clipboard
    +    notify-send "'$chosen' copied to clipboard." &
     fi
     
    -
    -

    Download-Video

    -
    -
    -
    if [ $TMUX ]; then
    -    tmux split -v -l 1 "cd ~/Downloads/ && youtube-dl --add-metadata -ic $1" && tmux select-pane -U
    -else
    -    cd ~/Downloads/;
    -    setsid nohup youtube-dl --add-metadata -ic $1 &> /dev/null &
    -fi
    -
    -
    -
    -

    Org-Protocol-Capture-HTML

    @@ -745,77 +563,23 @@ Send to Emacs
    -
    -

    Pdf Shrink

    -
    + +
    +

    Restart Mopidy

    +
    -
    shrink ()
    -{
    -gs \
    -  -q -dNOPAUSE -dBATCH -dSAFER \
    -  -sDEVICE=pdfwrite \
    -  -dCompatibilityLevel=1.3 \
    -  -dPDFSETTINGS=/screen \
    -  -dEmbedAllFonts=true \
    -  -dSubsetFonts=true \
    -  -dAutoRotatePages=/None \
    -  -dColorImageDownsampleType=/Bicubic \
    -  -dColorImageResolution=$3 \
    -  -dGrayImageDownsampleType=/Bicubic \
    -  -dGrayImageResolution=$3 \
    -  -dMonoImageDownsampleType=/Subsample \
    -  -dMonoImageResolution=$3 \
    -  -sOutputFile="$2" \
    -  "$1"
    -}
    +
    pids=( $(pgrep -f mopidy) )
     
    -check_smaller ()
    -{
    -# If $1 and $2 are regular files, we can compare file sizes to
    -# see if we succeeded in shrinking. If not, we copy $1 over $2:
    -if [ ! -f "$1" -o ! -f "$2" ]; then
    -return 0;
    -fi
    -ISIZE="$(echo $(wc -c "$1") | cut -f1 -d\ )"
    -OSIZE="$(echo $(wc -c "$2") | cut -f1 -d\ )"
    -if [ "$ISIZE" -lt "$OSIZE" ]; then
    -echo "Input smaller than output, doing straight copy" >&2
    -cp "$1" "$2"
    -fi
    -}
    +for pid in "${pids[@]}"; do
    +    if [[ $pid != $$ ]]; then
    +        kill "$pid"
    +    fi
    +done
     
    -usage ()
    -{
    -echo "Reduces PDF filesize by lossy recompressing with Ghostscript."
    -echo "Not guaranteed to succeed, but usually works."
    -echo "  Usage: $1 infile [outfile] [resolution_in_dpi]"
    -}
    -
    -IFILE="$1"
    -
    -# Need an input file:
    -if [ -z "$IFILE" ]; then
    -usage "$0"
    -exit 1
    -fi
    -
    -# Output filename defaults to "-" (stdout) unless given:
    -if [ ! -z "$2" ]; then
    -OFILE="$2"
    -else
    -OFILE="-"
    -fi
    -
    -# Output resolution defaults to 72 unless given:
    -if [ ! -z "$3" ]; then
    -res="$3"
    -else
    -res="90"
    -fi
    -
    -shrink "$IFILE" "$OFILE" "$res" || exit $?
    -
    -check_smaller "$IFILE" "$OFILE"
    +echo "Killed mopidy."
    +echo "Restarting mopidy..."
    +mopidy --config ~/.config/mopidy/mopidy.conf >/dev/null 2>&1 &
    +echo "Done"
     
    @@ -823,7 +587,7 @@ check_smaller "

    Author: Dehaeze Thomas

    -

    Created: 2020-01-28 mar. 21:32

    +

    Created: 2020-03-01 dim. 22:50

    diff --git a/docs/sxhkd.html b/docs/sxhkd.html index a72c5ea..82365dc 100644 --- a/docs/sxhkd.html +++ b/docs/sxhkd.html @@ -4,7 +4,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Simple X Hotkey Daemon @@ -201,50 +201,28 @@ @@ -274,26 +252,26 @@ for the JavaScript code in this tag.
  • Change Keyboard Layout
  • BSPWM related -
  • -
  • I3 related -
  • +
  • I3 related + +
  • @@ -358,8 +336,8 @@ super + shift + w rofi -show window # Bookmarks -super + shift + f - $HOME/bin/bukurun +# super + shift + f +# $HOME/bin/bukurun # Passwords super + shift + p @@ -382,8 +360,7 @@ super + shift + c # File Manager super + o - $TERMINAL -e "ranger" - # $TERMINAL -e "tmux -L ranger attach" + $TERMINAL -e "tmux new-session -A -s ranger ranger" # Browser super + i @@ -483,55 +460,50 @@ super + space ; c # GUI Calendar (Google Calendar) super + space ; shift + c - qutebrowser https://calendar.google.com/ - -# Ranger -super + space ; r - $TERMINAL -e "tmux -L ranger attach" + $BROWSER https://calendar.google.com/ # pcmanfm: GUI file manager -super + space ; shift + r +super + space ; o pcmanfm; # Mails with neomutt super + space ; m - $TERMINAL -e "neomutt" - # $TERMINAL -e "tmux -L neomutt attach" + $TERMINAL -e "tmux new-session -A -s neomutt neomutt" super + space ; shift + m $TERMINAL -e "neomutt -R" # Weechat super + space ; w - $TERMINAL -e "tmux -L weechat attach" + $TERMINAL -e "tmux new-session -A -s weechat weechat" # News with newsboat super + space ; n - $TERMINAL -e "tmux -L newsboat attach" + $TERMINAL -e "tmux new-session -A -s newsboat newsboat" # Music with ncmpcpp super + space ; p - $TERMINAL -e "tmux -L ncmpcpp attach" + $TERMINAL -e "tmux new-session -A -s ncmpcpp ncmpcpp" # Print Screen super + space ; shift + p - ~/bin/screenshot + $HOME/scripts/mopidy-restart.sh -# Browser with qutebrowser +# Default Browser super + space ; i - qutebrowser; + $BROWSER; -# Browser with firefox +# Alternative Browser super + space ; shift + i - firefox; + brave; + +# Emacs +super + space ; e + emacs; # Emacs Client -super + space ; e - emacsclient -create-frame --alternate-editor="" - -# Full Emacs - Usefull when installing packages super + space ; shift + e - emacs; + emacsclient -create-frame --alternate-editor=""
    @@ -555,9 +527,9 @@ super + shift + d
    -
    -

    BSPWM hotkeys

    -
    +
    +

    BSPWM hotkeys

    +
    # quit/restart bspwm
     super + alt + {q,r}
    @@ -571,9 +543,9 @@ super + {_,shift + }q
     
    -
    -

    Monocle Layout

    -
    +
    +

    Monocle Layout

    +
    # alternate between the tiled and monocle layout
     super + m
    @@ -587,9 +559,9 @@ super + c
     
    -
    -

    Set the window State

    -
    +
    +

    Set the window State

    +
    # Set the window state to tiled
     super + t
    @@ -616,9 +588,9 @@ super + s
     
    -
    -

    Sticky Window

    -
    +
    +

    Sticky Window

    +
    # set the node flags
     super + ctrl + y
    @@ -663,9 +635,9 @@ super + shift + {1-9}
     
    -
    -

    Preselect

    -
    +
    +

    Preselect

    +
    # preselect the direction
     super + ctrl + {h,j,k,l}
    @@ -683,9 +655,9 @@ super + ctrl + space
     
    -
    -

    Resize

    -
    +
    +

    Resize

    +
    # expand a window by moving one of its side outward
     super + alt + {h,j,k,l}
    @@ -712,9 +684,9 @@ super + {Left,Down,Up,Right}
     
    -
    -

    BSPWM hotkeys

    -
    +
    +

    Quit/Restart hotkeys

    +
    # quit/restart bspwm
     super + alt + {q,r}
    @@ -728,9 +700,9 @@ super + {_,shift + }q
     
    -
    -

    Monocle Layout

    -
    +
    +

    Monocle Layout

    +
    # alternate between the tiled and monocle layout
     super + f
    @@ -744,9 +716,9 @@ super + c
     
    -
    -

    Set the window State

    -
    +
    +

    Set the window State

    +
    # set the window state
     super + {t,s, shift + f}
    @@ -756,9 +728,9 @@ super + {t,s, shift + f}
     
    -
    -

    Sticky Window

    -
    +
    +

    Sticky Window

    +
    super + ctrl + y
       i3-msg sticky toggle
    @@ -804,9 +776,9 @@ super + shift + {1-9}
     
    -
    -

    Preselect

    -
    +
    +

    Preselect

    +

    Preselect the direction

    @@ -821,9 +793,9 @@ super + ctrl + {j,k,Up,Down}
    -
    -

    Resize

    -
    +
    +

    Resize

    +

    Expand/Shrink a window

    @@ -844,7 +816,7 @@ super + alt + l

    Author: Dehaeze Thomas

    -

    Created: 2020-01-28 mar. 21:31

    +

    Created: 2020-03-01 dim. 22:49

    diff --git a/docs/systemd.html b/docs/systemd.html index ed062a3..e225916 100644 --- a/docs/systemd.html +++ b/docs/systemd.html @@ -4,7 +4,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Systemd services and timers @@ -201,50 +201,28 @@ @@ -260,75 +238,50 @@ for the JavaScript code in this tag. @@ -343,9 +296,9 @@ for the JavaScript code in this tag.

    Pass Git

    -
    -

    Service

    -
    +
    +

    Service

    +
    [Unit]
     Description=Sync Passwords every day
    @@ -360,19 +313,19 @@ for the JavaScript code in this tag.
     
    -
    -

    Timer

    -
    +
    +

    Timer

    +
    [Unit]
     Description=Sync Passwords every day
     RefuseManualStart=no
     RefuseManualStop=no
     Wants=network-online.target
    -After=network.target network-online.target dbus.socket
    +After=network-online.target
     
     [Timer]
    -OnCalendar=*-*-* 17:00:00
    +OnCalendar=*-*-* 16:00:00
     Persistent=true
     Unit=passgit.service
     
    @@ -383,9 +336,9 @@ for the JavaScript code in this tag.
     
    -
    -

    Script

    -
    +
    +

    Script

    +
    pass git pull --rebase && pass git push
     
    @@ -398,9 +351,9 @@ for the JavaScript code in this tag.

    Buku Git

    -
    -

    Service

    -
    +
    +

    Service

    +
    [Unit]
     Description=Sync Bookmarks every day
    @@ -415,16 +368,16 @@ for the JavaScript code in this tag.
     
    -
    -

    Timer

    -
    +
    +

    Timer

    +
    [Unit]
     Description=Sync All Mails every x hours
     RefuseManualStart=no
     RefuseManualStop=no
     Wants=network-online.target
    -After=network.target network-online.target dbus.socket
    +After=network-online.target
     
     [Timer]
     OnCalendar=*-*-* 16:00:00
    @@ -438,9 +391,9 @@ for the JavaScript code in this tag.
     
    -
    -

    Script

    -
    +
    +

    Script

    +
    cd ~/.local/share/buku/
     
    @@ -461,9 +414,9 @@ for the JavaScript code in this tag.
     

    Check mail

    -
    -

    Service

    -
    +
    +

    Service

    +
    [Unit]
     Description=Check new mails
    @@ -472,29 +425,29 @@ for the JavaScript code in this tag.
     
     [Service]
     Type=oneshot
    -ExecStart=%h/scripts/checkmail.sh -q -v
    +ExecStart=%h/scripts/checkmail.sh -q
     
    -
    -

    Timer

    -
    +
    +

    Timer

    +
    [Unit]
     Description=Check Mail every x minutes
     RefuseManualStart=no
     RefuseManualStop=no
     Wants=network-online.target
    -After=network.target network-online.target dbus.socket
    +After=network-online.target
     Requires=checkmail.service
     
     [Timer]
     Persistent=false
     OnBootSec=2min
     OnUnitActiveSec=5min
    -AccuracySec=10s
    +AccuracySec=2min
     Unit=checkmail.service
     
     [Install]
    @@ -504,9 +457,9 @@ for the JavaScript code in this tag.
     
    -
    -

    Script

    -
    +
    +

    Script

    +
    while [ -n "$1" ]; do # while loop starts
         case "$1" in
    @@ -572,9 +525,9 @@ mu index --maildir=~/.mail $opt_verbose $
     

    Sync mail

    -
    -

    Service

    -
    +
    +

    Service

    +
    [Unit]
     Description=Sync all mails
    @@ -583,29 +536,29 @@ mu index --maildir=~/.mail $opt_verbose $
     
     [Service]
     Type=oneshot
    -ExecStart=%h/scripts/checkmail.sh -a -q -v
    +ExecStart=%h/scripts/checkmail.sh -a -q
     
    -
    -

    Timer

    -
    +
    +

    Timer

    +
    [Unit]
     Description=Sync All Mails every x hours
     RefuseManualStart=no
     RefuseManualStop=no
     Wants=network-online.target
    -After=network.target network-online.target dbus.socket
    +After=network-online.target
     Requires=syncmail.service
     
     [Timer]
     Persistent=false
     OnBootSec=30min
     OnUnitActiveSec=300min
    -AccuracySec=10s
    +AccuracySec=10min
     Unit=syncmail.service
     
     [Install]
    @@ -620,27 +573,27 @@ mu index --maildir=~/.mail $opt_verbose $
     

    Vdirsyncer

    -
    -

    Service

    -
    +
    +

    Service

    +
    [Unit]
     Description=Synchronize calendars and contacts
     Documentation=https://vdirsyncer.readthedocs.org/
     Wants=network-online.target
    -After=network.target network-online.target
    +After=network-online.target
     
     [Service]
    -ExecStart=/usr/bin/vdirsyncer sync
    +ExecStart=/usr/bin/vdirsyncer --verbosity "ERROR" sync
     Type=oneshot
     
    -
    -

    Timer

    -
    +
    +

    Timer

    +
    [Unit]
     Description=Synchronize vdirs
    @@ -658,167 +611,13 @@ mu index --maildir=~/.mail $opt_verbose $
     
    -
    -

    Ranger

    -
    -
    -
    -

    Service

    -
    -
    -
    [Unit]
    -Description=Ranger using Tmux
    -
    -[Service]
    -Type=forking
    -ExecStart=/usr/bin/tmux -L ranger new -d -s ranger ranger
    -ExecStop=/usr/bin/tmux -L ranger kill-session -t ranger
    -Restart=always
    -RestartSec=1
    -
    -[Install]
    -WantedBy=multi-user.target
    -
    -
    -
    -
    -
    - -
    -

    Weechat

    -
    -
    -
    -

    Service

    -
    -
    -
    [Unit]
    -Description=A WeeChat client and relay service using Tmux
    -Wants=network-online.target
    -After=network.target network-online.target
    -
    -[Service]
    -Type=forking
    -ExecStart=/usr/bin/tmux -L weechat new -d -s weechat weechat
    -ExecStop=/usr/bin/tmux -L weechat kill-session -t weechat
    -Restart=always
    -RestartSec=3
    -
    -[Install]
    -WantedBy=multi-user.target
    -
    -
    -
    -
    -
    - -
    -

    Neomutt

    -
    -
    -
    -

    Service

    -
    -
    -
    [Unit]
    -Description=Neomutt - mail client
    -
    -[Service]
    -Type=forking
    -ExecStart=/usr/bin/tmux -L neomutt new -d -s neomutt neomutt
    -ExecStop=/usr/bin/tmux -L neomutt kill-session -t neomutt
    -Restart=always
    -RestartSec=3
    -
    -[Install]
    -WantedBy=multi-user.target
    -
    -
    -
    -
    -
    - -
    -

    Powertop

    -
    -
    -
    -

    Service

    -
    -
    -
    [Unit]
    -Description=Powertop tunings
    -
    -[Service]
    -ExecStart=/usr/bin/powertop --auto-tune
    -RemainAfterExit=true
    -
    -[Install]
    -WantedBy=multi-user.target
    -
    -
    -
    -
    -
    -
    -

    NCMPCPP

    -
    -
    -
    -

    Service

    -
    -
    -
    [Unit]
    -Description=Ncmpcpp - Music Player
    -
    -[Service]
    -Type=forking
    -ExecStart=/usr/bin/tmux -L ncmpcpp new -d -s ncmpcpp ncmpcpp
    -ExecStop=/usr/bin/tmux -L ncmpcpp kill-session -t ncmpcpp
    -Restart=always
    -RestartSec=3
    -
    -[Install]
    -WantedBy=multi-user.target
    -
    -
    -
    -
    -
    - -
    -

    Newsboat

    -
    -
    -
    -

    Service

    -
    -
    -
    [Unit]
    -Description=Newsboat - RSS reader
    -
    -[Service]
    -Type=forking
    -ExecStart=/usr/bin/tmux -L newsboat new -d -s newsboat newsboat
    -ExecStop=/usr/bin/tmux -L newsboat kill-session -t newsboat
    -Restart=always
    -RestartSec=3
    -
    -[Install]
    -WantedBy=multi-user.target
    -
    -
    -
    -
    -
    -

    SSH Agent

    -
    -

    Service

    -
    +
    +

    Service

    +
    [Unit]
     Description=SSH key agent
    @@ -836,13 +635,36 @@ mu index --maildir=~/.mail $opt_verbose $
     
    +
    +

    Powertop

    +
    +
    +
    +

    Service

    +
    +
    +
    [Unit]
    +Description=Powertop tunings
    +
    +[Service]
    +ExecStart=/usr/bin/powertop --auto-tune
    +RemainAfterExit=true
    +
    +[Install]
    +WantedBy=multi-user.target
    +
    +
    +
    +
    +
    +

    Mopidy

    -
    -

    Service

    -
    +
    +

    Service

    +
    [Unit]
     Description=Mopidy music server
    @@ -867,7 +689,7 @@ mu index --maildir=~/.mail $opt_verbose $
     

    Author: Dehaeze Thomas

    -

    Created: 2020-01-28 mar. 21:32

    +

    Created: 2020-03-01 dim. 22:50

    diff --git a/docs/xconfig.html b/docs/xconfig.html index 6ab7eb7..d49263f 100644 --- a/docs/xconfig.html +++ b/docs/xconfig.html @@ -4,7 +4,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Configuration Files related to Xorg @@ -201,50 +201,28 @@ @@ -630,15 +608,6 @@ keycode 255 = XF86RFKill NoSym
    -

    -Start gnome-keyring-daemon in order not to be asked for password to unlock GPG key. -

    -
    -
    # eval $(/usr/bin/gnome-keyring-daemon --start --components=pkcs11,secrets,ssh)
    -# export SSH_AUTH_SOCK
    -
    -
    -

    Fix for Matlab.

    @@ -751,6 +720,11 @@ synology-drive &
    +
    +
    mopidy --config ~/.config/mopidy/mopidy.conf >/dev/null 2>&1 &
    +
    +
    +

    Finally, run SXHKD for the key bindings.

    @@ -765,7 +739,7 @@ Finally, run SXHKD for the key bindings.

    Author: Dehaeze Thomas

    -

    Created: 2020-01-28 mar. 21:32

    +

    Created: 2020-03-01 dim. 22:50

    diff --git a/dotfiles/contacts.org b/dotfiles/contacts.org index 07ffbf8..5045012 100644 --- a/dotfiles/contacts.org +++ b/dotfiles/contacts.org @@ -18,10 +18,10 @@ :END: * Khard - :PROPERTIES: - :header-args: :tangle ~/.config/khard/khard.conf - :header-args+: :comments both :mkdirp yes - :END: +:PROPERTIES: +:header-args: :tangle ~/.config/khard/khard.conf +:header-args+: :comments both :mkdirp yes +:END: #+BEGIN_SRC conf # example configuration file for khard version >= 0.13.0