extensive update: some cleanup, todo/agenda changes, publishing system, swayfx, WIPs, etc.
This commit is contained in:
		
							
								
								
									
										3
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							@@ -11,3 +11,6 @@ home/default/.config/gtk-3.0/bookmarks
 | 
			
		||||
home/default/.config/zsh/.zcompdump
 | 
			
		||||
home/default/.local/bin/start-tasks
 | 
			
		||||
home/default/.config/newsboat/urls
 | 
			
		||||
home/default/.config/doom/bookmarks
 | 
			
		||||
home/default/.config/doom/custom.el
 | 
			
		||||
home/default/.config/doom/config/+priv-config.el
 | 
			
		||||
 
 | 
			
		||||
@@ -1,356 +1,295 @@
 | 
			
		||||
;;; $DOOMDIR/config.el -*- lexical-binding: t; -*-
 | 
			
		||||
 | 
			
		||||
;; Place your private configuration here! Remember, you do not need to run 'doom
 | 
			
		||||
;; sync' after modifying this file!
 | 
			
		||||
(load! "config/+priv-config")
 | 
			
		||||
;(load! "config/+centaur-tabs-config") ;; enable this config if :ui tabs
 | 
			
		||||
;(load! "config/+termux-config") ;; enable if termux
 | 
			
		||||
 | 
			
		||||
(setq doom-font (font-spec :family "DejaVu Sans Mono" :size 12)
 | 
			
		||||
      ;doom-variable-pitch-font (font-spec :family "IBM Plex Serif" :size 15))
 | 
			
		||||
      doom-variable-pitch-font (font-spec :family "Libertinus Serif" :size 15))
 | 
			
		||||
      ;doom-variable-pitch-font (font-spec :family "IBM Plex Sans" :size 15))
 | 
			
		||||
 | 
			
		||||
;;; LOOKS
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
;; Some functionality uses this to identify you, e.g. GPG configuration, email
 | 
			
		||||
;; clients, file templates and snippets. It is optional.
 | 
			
		||||
(setq user-full-name "John Doe"
 | 
			
		||||
      user-mail-address "john@doe.com")
 | 
			
		||||
;; favorite themes
 | 
			
		||||
(setq doom-theme
 | 
			
		||||
      ;'doom-tomorrow-night
 | 
			
		||||
      'doom-tomorrow-night-r
 | 
			
		||||
      ;'doom-one
 | 
			
		||||
      ;'doom-wilmersdorf
 | 
			
		||||
      ;'doom-monokai-ristretto
 | 
			
		||||
      ;'doom-plain-dark
 | 
			
		||||
      ;'doom-feather-dark
 | 
			
		||||
 | 
			
		||||
;; Doom exposes five (optional) variables for controlling fonts in Doom:
 | 
			
		||||
;;
 | 
			
		||||
;; - `doom-font' -- the primary font to use
 | 
			
		||||
;; - `doom-variable-pitch-font' -- a non-monospace font (where applicable)
 | 
			
		||||
;; - `doom-big-font' -- used for `doom-big-font-mode'; use this for
 | 
			
		||||
;;   presentations or streaming.
 | 
			
		||||
;; - `doom-unicode-font' -- for unicode glyphs
 | 
			
		||||
;; - `doom-serif-font' -- for the `fixed-pitch-serif' face
 | 
			
		||||
;;
 | 
			
		||||
;; See 'C-h v doom-font' for documentation and more examples of what they
 | 
			
		||||
;; accept. For example:
 | 
			
		||||
;;
 | 
			
		||||
(setq doom-variable-pitch-font (font-spec :family "Libertinus Serif" :size 13))
 | 
			
		||||
;;(setq doom-variable-pitch-font (font-spec :family "DejaVu Serif" :size 13))
 | 
			
		||||
;;
 | 
			
		||||
      ;; light themes
 | 
			
		||||
      ;'doom-plain
 | 
			
		||||
      ;'doom-flatwhite
 | 
			
		||||
      ;'leuven
 | 
			
		||||
      )
 | 
			
		||||
 | 
			
		||||
;; If you or Emacs can't find your font, use 'M-x describe-font' to look them
 | 
			
		||||
;; up, `M-x eval-region' to execute elisp code, and 'M-x doom/reload-font' to
 | 
			
		||||
;; refresh your font settings. If Emacs still can't find your font, it likely
 | 
			
		||||
;; wasn't installed correctly. Font issues are rarely Doom issues!
 | 
			
		||||
;; doom dashboard
 | 
			
		||||
;; remove useless dashboard info
 | 
			
		||||
(remove-hook '+doom-dashboard-functions #'doom-dashboard-widget-shortmenu)
 | 
			
		||||
(add-hook! '+doom-dashboard-mode-hook (hide-mode-line-mode 1) (hl-line-mode -1))
 | 
			
		||||
(setq-hook! '+doom-dashboard-mode-hook evil-normal-state-cursor (list nil))
 | 
			
		||||
 | 
			
		||||
;; There are two ways to load a theme. Both assume the theme is installed and
 | 
			
		||||
;; available. You can either set `doom-theme' or manually load a theme with the
 | 
			
		||||
;; `load-theme' function. This is the default:
 | 
			
		||||
;(setq doom-theme 'doom-tomorrow-night)
 | 
			
		||||
;(setq doom-theme 'doom-one)
 | 
			
		||||
;(setq doom-theme 'doom-wilmersdorf)
 | 
			
		||||
;(setq doom-theme 'doom-plain-dark)
 | 
			
		||||
;(setq doom-theme 'doom-feather-dark)
 | 
			
		||||
;(setq doom-theme 'doom-monokai-ristretto)
 | 
			
		||||
;; opacity
 | 
			
		||||
(set-frame-parameter (selected-frame) 'alpha-background 80) (add-to-list 'default-frame-alist '(alpha-background . 80))
 | 
			
		||||
 | 
			
		||||
;(setq doom-theme 'doom-plain)
 | 
			
		||||
(setq doom-theme 'doom-flatwhite)
 | 
			
		||||
 | 
			
		||||
;; This determines the style of line numbers in effect. If set to `nil', line
 | 
			
		||||
;; numbers are disabled. For relative line numbers, set this to `relative'.
 | 
			
		||||
(setq display-line-numbers-type t)
 | 
			
		||||
 | 
			
		||||
;; If you use `org' and don't want your org files in the default location below,
 | 
			
		||||
;; change `org-directory'. It must be set before org loads!
 | 
			
		||||
(setq org-directory "~/notebook/")
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
;; Whenever you reconfigure a package, make sure to wrap your config in an
 | 
			
		||||
;; `after!' block, otherwise Doom's defaults may override your settings. E.g.
 | 
			
		||||
;;
 | 
			
		||||
;;   (after! PACKAGE
 | 
			
		||||
;;     (setq x y))
 | 
			
		||||
;;
 | 
			
		||||
;; The exceptions to this rule:
 | 
			
		||||
;;
 | 
			
		||||
;;   - Setting file/directory variables (like `org-directory')
 | 
			
		||||
;;   - Setting variables which explicitly tell you to set them before their
 | 
			
		||||
;;     package is loaded (see 'C-h v VARIABLE' to look up their documentation).
 | 
			
		||||
;;   - Setting doom variables (which start with 'doom-' or '+').
 | 
			
		||||
;;
 | 
			
		||||
;; Here are some additional functions/macros that will help you configure Doom.
 | 
			
		||||
;;
 | 
			
		||||
;; - `load!' for loading external *.el files relative to this one
 | 
			
		||||
;; - `use-package!' for configuring packages
 | 
			
		||||
;; - `after!' for running code after a package has loaded
 | 
			
		||||
;; - `add-load-path!' for adding directories to the `load-path', relative to
 | 
			
		||||
;;   this file. Emacs searches the `load-path' when you load packages with
 | 
			
		||||
;;   `require' or `use-package'.
 | 
			
		||||
;; - `map!' for binding new keys
 | 
			
		||||
;;
 | 
			
		||||
;; To get information about any of these functions/macros, move the cursor over
 | 
			
		||||
;; the highlighted symbol at press 'K' (non-evil users must press 'C-c c k').
 | 
			
		||||
;; This will open documentation for it, including demos of how they are used.
 | 
			
		||||
;; Alternatively, use `C-h o' to look up a symbol (functions, variables, faces,
 | 
			
		||||
;; etc).
 | 
			
		||||
;;
 | 
			
		||||
;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how
 | 
			
		||||
;; they are implemented.
 | 
			
		||||
;; enable variable-pitch-mode for texts
 | 
			
		||||
;(add-hook 'text-mode-hook
 | 
			
		||||
;           (lambda ()
 | 
			
		||||
;            (variable-pitch-mode 1)))
 | 
			
		||||
 | 
			
		||||
(after! org
 | 
			
		||||
  (setq display-line-numbers-type nil
 | 
			
		||||
        org-hide-emphasis-markers t
 | 
			
		||||
        org-pretty-entities t
 | 
			
		||||
        org-ellipsis "…"
 | 
			
		||||
        org-image-actual-width 600))
 | 
			
		||||
(setq display-line-numbers-type nil)
 | 
			
		||||
 | 
			
		||||
;;; dont really use org-modern anymore but it might be useful for reference
 | 
			
		||||
;(use-package! org-modern
 | 
			
		||||
;  :init
 | 
			
		||||
;  ;(add-hook 'doom-post-init-hook (global-org-modern-mode))
 | 
			
		||||
;  :config
 | 
			
		||||
;  (setq org-modern-priority-faces
 | 
			
		||||
;        '((?A :inherit error
 | 
			
		||||
;              :inverse-video t)
 | 
			
		||||
;          (?B :inherit warning
 | 
			
		||||
;              :inverse-video t)
 | 
			
		||||
;          (?C :inherit success
 | 
			
		||||
;              :inverse-video t)
 | 
			
		||||
;          (?D :inherit error
 | 
			
		||||
;              :inverse-video t)
 | 
			
		||||
;          (?E :inherit warning
 | 
			
		||||
;              :inverse-video t)
 | 
			
		||||
;          (?F :inherit success
 | 
			
		||||
;              :inverse-video t))))
 | 
			
		||||
 | 
			
		||||
;; show time
 | 
			
		||||
;(setq display-time-format "%F %I:%M:%S"
 | 
			
		||||
;      display-time-interval 1
 | 
			
		||||
;      display-time-default-load-average nil)
 | 
			
		||||
;(add-hook 'doom-post-init-hook (display-time))
 | 
			
		||||
 | 
			
		||||
;; disable flyspell-mode
 | 
			
		||||
(after! flyspell
 | 
			
		||||
  (setq-default spell-checking-enable-by-default nil))
 | 
			
		||||
 | 
			
		||||
;; disable gutter for org-mode
 | 
			
		||||
(after! git-gutter
 | 
			
		||||
  (setq git-gutter:disabled-modes '(fundamental-mode image-mode pdf-view-mode org-mode)))
 | 
			
		||||
 | 
			
		||||
;; diary / journal
 | 
			
		||||
(after! org-journal
 | 
			
		||||
  (setq org-journal-dir "~/diary"
 | 
			
		||||
        org-journal-date-prefix "#+TITLE: "
 | 
			
		||||
        org-journal-time-prefix "+ "
 | 
			
		||||
        org-journal-date-format "%a, %Y-%m-%d"
 | 
			
		||||
        org-journal-file-format "%Y-%m-%d.org"))
 | 
			
		||||
 | 
			
		||||
;; reading list
 | 
			
		||||
(use-package! org-books
 | 
			
		||||
  :defer t
 | 
			
		||||
  :config
 | 
			
		||||
  (setq org-books-file "~/notebook/readinglist.org"))
 | 
			
		||||
 | 
			
		||||
;;; org settings
 | 
			
		||||
(setq org-directory "~/notebook/"
 | 
			
		||||
      bookmark-default-file "~/.config/doom/bookmarks")
 | 
			
		||||
(load! "config/+org-capture-config")
 | 
			
		||||
(load! "config/+org-roam-config")
 | 
			
		||||
(load! "config/+org-wild-notifier-config")
 | 
			
		||||
(load! "config/+org-pomodoro-config")
 | 
			
		||||
 | 
			
		||||
(after! org
 | 
			
		||||
  (setq org-log-done 'time
 | 
			
		||||
        org-log-into-drawer t
 | 
			
		||||
        ;About the 2 elisp lines below: If you want to send items without explicit
 | 
			
		||||
        ;priorities to the bottom of the list you have to set org-default-priority to the
 | 
			
		||||
        ;value of org-lowest-priority). I did this to make recognize that: PRIORITY=0 are
 | 
			
		||||
        ;items without explicit priorities (not A, B or C, but just TODO)
 | 
			
		||||
        org-lowest-priority ?E
 | 
			
		||||
        org-default-priority ?E)
 | 
			
		||||
  (defun jethro/org-archive-done-tasks ()
 | 
			
		||||
    "Archive all done tasks."
 | 
			
		||||
    (interactive)
 | 
			
		||||
    (org-map-entries 'org-archive-subtree "/DONE" 'file)))
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
;;; agenda, todos
 | 
			
		||||
 | 
			
		||||
;;; agenda files
 | 
			
		||||
(setq org-agenda-files '("~/housekeeping/calendar.org"
 | 
			
		||||
                         "~/notebook/ag/"
 | 
			
		||||
                         "~/notebook/ag/"                ;; todo.org and habits.org shorthand for agendas
 | 
			
		||||
                         "~/notebook/refile.org"
 | 
			
		||||
                         "~/notebook/notes/events/birthdays.org"))
 | 
			
		||||
 | 
			
		||||
(after! org-agenda
 | 
			
		||||
  (setq org-agenda-sticky t)) ; dont kill agendas
 | 
			
		||||
 | 
			
		||||
  (setq org-log-done 'time)
 | 
			
		||||
; note that eisenhower matrix and agenda commands below and mappings for them
 | 
			
		||||
; assumes that you've tagged them correctly, basically:
 | 
			
		||||
; 1. :habits: :daily_tasks:
 | 
			
		||||
; - only purpose of this is for filtering them out
 | 
			
		||||
;   - :habits: are for all recurring tasks
 | 
			
		||||
;   - :daily_tasks: are for everyday tasks
 | 
			
		||||
; 2. :todo:
 | 
			
		||||
; - will be included in the eisenhower matrix
 | 
			
		||||
;   priorities are #A, #B, #C, #D/not-set/other
 | 
			
		||||
;   for urgency and importancy levels
 | 
			
		||||
;
 | 
			
		||||
; the view "Schedule/Eisenhower-List" is for both tracking scheduled tasks (:habits:) and
 | 
			
		||||
; :todo:'s that are not scheduled but categorized with a priority (e.g. [#A])
 | 
			
		||||
; using this view should be enough for what i need
 | 
			
		||||
 | 
			
		||||
  (use-package! org-journal
 | 
			
		||||
    :init
 | 
			
		||||
    (setq org-journal-dir "~/diary"
 | 
			
		||||
          org-journal-date-prefix "#+TITLE: "
 | 
			
		||||
          org-journal-time-prefix "+ "
 | 
			
		||||
          org-journal-date-format "%a, %Y-%m-%d"
 | 
			
		||||
          org-journal-file-format "%Y-%m-%d.org"
 | 
			
		||||
        )
 | 
			
		||||
  )
 | 
			
		||||
(load! "config/+eisenhower-matrix-list")
 | 
			
		||||
 | 
			
		||||
  (use-package! org-books
 | 
			
		||||
    :init
 | 
			
		||||
    (setq org-books-file "~/notebook/readinglist.org")
 | 
			
		||||
  )
 | 
			
		||||
(load! "config/+eisenhower-matrix")
 | 
			
		||||
 | 
			
		||||
(load! "config/+todo-workspaces")
 | 
			
		||||
 | 
			
		||||
  ;; NOTIFICATIONS CONFIGURATION REFERENCE
 | 
			
		||||
  ;;; note : it's probably better to add this after
 | 
			
		||||
  ;;;        setting org-agenda-files.
 | 
			
		||||
  ;;;        use this under (!after org ...
 | 
			
		||||
  ;;;        else it would't work
 | 
			
		||||
  ;
 | 
			
		||||
  ;(use-package! org-wild-notifier
 | 
			
		||||
  ;  :defer t
 | 
			
		||||
  ;  :init
 | 
			
		||||
  ;  (add-hook 'doom-post-init-hook (org-wild-notifier-mode))
 | 
			
		||||
  ;  :config
 | 
			
		||||
  ;  (setq alert-default-style 'libnotify)
 | 
			
		||||
  ;;; set to libnotify or notifications or osx-notifier
 | 
			
		||||
  ;  (setq org-wild-notifier-alert-time '(60 30))
 | 
			
		||||
  ;;; alert time defaults to '(10) if not set
 | 
			
		||||
  ;  (setq org-wild-notifier-keyword-whitelist nil))
 | 
			
		||||
  ;  (setq org-wild-notifier-keyword-blacklist '("DONE"))
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  (use-package! org-wild-notifier
 | 
			
		||||
    :defer t
 | 
			
		||||
    :init
 | 
			
		||||
    (add-hook 'doom-post-init-hook (org-wild-notifier-mode))
 | 
			
		||||
    :config
 | 
			
		||||
    (setq alert-default-style 'libnotify)
 | 
			
		||||
    (setq org-wild-notifier-alert-time '(10 0))
 | 
			
		||||
    (setq org-wild-notifier-keyword-whitelist nil))
 | 
			
		||||
    (setq org-wild-notifier-keyword-blacklist '("DONE"))
 | 
			
		||||
 | 
			
		||||
  ;; org-roam configurations
 | 
			
		||||
  (use-package! org-roam
 | 
			
		||||
    :ensure t
 | 
			
		||||
    :custom
 | 
			
		||||
    (setq org-roam-directory "~/notebook/roam/")
 | 
			
		||||
    :config
 | 
			
		||||
    (org-roam-setup))
 | 
			
		||||
 | 
			
		||||
  (setq org-roam-capture-templates
 | 
			
		||||
      '(("d" "default" plain "%?"
 | 
			
		||||
         :target (file+head "%<%Y%m%d%H%M%S>-${slug}.org"
 | 
			
		||||
                            "#+title: ${title}\n")
 | 
			
		||||
         :unnarrowed t)
 | 
			
		||||
 | 
			
		||||
        ;; main things
 | 
			
		||||
        ("l" "literature" plain "%?"
 | 
			
		||||
         :if-new
 | 
			
		||||
         (file+head "literature/%<%Y%m%d%H%M%S>-${title}.org" "#+title: ${title}\n")
 | 
			
		||||
         :immediate-finish t
 | 
			
		||||
         :unnarrowed t)
 | 
			
		||||
        ("p" "permanent" plain "%?"
 | 
			
		||||
         :if-new
 | 
			
		||||
         (file+head "permanent/%<%Y%m%d%H%M%S>-${title}.org" "#+title: ${title}\n")
 | 
			
		||||
         :immediate-finish t
 | 
			
		||||
         :unnarrowed t)
 | 
			
		||||
        ("f" "fleeting" plain "%?"
 | 
			
		||||
         :if-new
 | 
			
		||||
         (file+head "fleeting/%<%Y%m%d%H%M%S>-${title}.org" "#+title: ${title}\n")
 | 
			
		||||
         :immediate-finish t
 | 
			
		||||
         :unnarrowed t)
 | 
			
		||||
 | 
			
		||||
        ;; other categories
 | 
			
		||||
        ("r" "reference" plain "%?"
 | 
			
		||||
         :if-new
 | 
			
		||||
         (file+head "reference/%<%Y%m%d%H%M%S>-${title}.org" "#+title: ${title}\n")
 | 
			
		||||
         :immediate-finish t
 | 
			
		||||
         :unnarrowed t)
 | 
			
		||||
        ("a" "article" plain "%?"
 | 
			
		||||
         :if-new
 | 
			
		||||
         (file+head "articles/%<%Y%m%d%H%M%S>-${title}.org" "#+title: ${title}\n#+filetags: :article:\n")
 | 
			
		||||
         :immediate-finish t
 | 
			
		||||
         :unnarrowed t)
 | 
			
		||||
 | 
			
		||||
        ("s" "school" plain "%?"
 | 
			
		||||
         :if-new
 | 
			
		||||
         (file+head "school/%<%Y%m%d%H%M%S>-${title}.org" "#+title: ${title}\n")
 | 
			
		||||
         :immediate-finish t
 | 
			
		||||
         :unnarrowed t)))
 | 
			
		||||
 | 
			
		||||
  ;(cl-defmethod org-roam-node-type ((node org-roam-node))
 | 
			
		||||
  ;  "Return the TYPE of NODE."
 | 
			
		||||
  ;  (condition-case nil
 | 
			
		||||
  ;      (file-name-nondirectory
 | 
			
		||||
  ;       (directory-file-name
 | 
			
		||||
  ;        (file-name-directory
 | 
			
		||||
  ;         (file-relative-name (org-roam-node-file node) org-roam-directory))))
 | 
			
		||||
  ;    (error "")))
 | 
			
		||||
 | 
			
		||||
  ;(setq org-roam-node-display-template
 | 
			
		||||
  ;      (concat "${type:15} ${title:*} " (propertize "${tags:10}" 'face 'org-tag)))
 | 
			
		||||
 | 
			
		||||
  ;;; org-capture stuff
 | 
			
		||||
  ;;; examples: file:~/.emacs.d/modules/lang/org/config.el
 | 
			
		||||
  ; my location of the todo.org file
 | 
			
		||||
  (setq +org-capture-todo-file "ag/todo.org")
 | 
			
		||||
 | 
			
		||||
  (defvar +org-capture-refile-file "refile.org")
 | 
			
		||||
  (setq +org-capture-refile-file
 | 
			
		||||
        (expand-file-name +org-capture-refile-file org-directory))
 | 
			
		||||
  ; refile.org at the root of org-directory
 | 
			
		||||
 | 
			
		||||
  ;(add-to-list 'org-capture-templates
 | 
			
		||||
  ;      '(("s" "Slipbox" entry  (file "braindump/org/inbox.org")
 | 
			
		||||
  ;       "* %?\n")
 | 
			
		||||
  ;        ("t" "Personal todo" entry
 | 
			
		||||
  ;         (file+headline +org-capture-todo-file "Inbox")
 | 
			
		||||
  ;         "* [ ] %?\n%i\n%a" :prepend t)
 | 
			
		||||
  ;      )
 | 
			
		||||
 | 
			
		||||
  (setq org-capture-templates
 | 
			
		||||
        '(("t" "Personal todo" entry
 | 
			
		||||
          (file+headline +org-capture-todo-file "todo")
 | 
			
		||||
          "* [ ] %?\n%i\n%a" :prepend t)
 | 
			
		||||
          ("T" "Personal todo (no link)" entry
 | 
			
		||||
          (file+headline +org-capture-todo-file "todo")
 | 
			
		||||
          "* [ ] %?\n" :prepend t)
 | 
			
		||||
 | 
			
		||||
          ;;; i never use this
 | 
			
		||||
          ;("n" "Personal notes" entry
 | 
			
		||||
          ;(file+headline +org-capture-notes-file "Inbox")
 | 
			
		||||
          ;"* %u %?\n%i\n%a" :prepend t)
 | 
			
		||||
          ("r" "Personal refile file" entry
 | 
			
		||||
          (file +org-capture-refile-file)
 | 
			
		||||
          "* %u %?\n%i\n%a" :prepend t)
 | 
			
		||||
 | 
			
		||||
          ;; using org-journal atm, i will likely never use this
 | 
			
		||||
          ;("j" "Journal" entry
 | 
			
		||||
          ;(file+olp+datetree +org-capture-journal-file)
 | 
			
		||||
          ;"* %U %?\n%i\n%a" :prepend t)
 | 
			
		||||
 | 
			
		||||
          ;; Will use {project-root}/{todo,notes,changelog}.org, unless a
 | 
			
		||||
          ;; {todo,notes,changelog}.org file is found in a parent directory.
 | 
			
		||||
          ;; Uses the basename from `+org-capture-todo-file',
 | 
			
		||||
          ;; `+org-capture-changelog-file' and `+org-capture-notes-file'.
 | 
			
		||||
          ("p" "Templates for projects")
 | 
			
		||||
          ("pt" "Project-local todo" entry  ; {project-root}/todo.org
 | 
			
		||||
           (file+headline +org-capture-project-todo-file "Inbox")
 | 
			
		||||
           "* TODO %?\n%i\n%a" :prepend t)
 | 
			
		||||
          ("pn" "Project-local notes" entry  ; {project-root}/notes.org
 | 
			
		||||
           (file+headline +org-capture-project-notes-file "Inbox")
 | 
			
		||||
           "* %U %?\n%i\n%a" :prepend t)
 | 
			
		||||
          ("pc" "Project-local changelog" entry  ; {project-root}/changelog.org
 | 
			
		||||
           (file+headline +org-capture-project-changelog-file "Unreleased")
 | 
			
		||||
           "* %U %?\n%i\n%a" :prepend t)
 | 
			
		||||
 | 
			
		||||
          ;; reference for function: [[file:~/.emacs.d/modules/lang/org/autoload/org-capture.el::defun +org--capture-central-file (file project]]
 | 
			
		||||
          ;; Will use {org-directory}/{+org-capture-projects-file} and store
 | 
			
		||||
          ;; these under {ProjectName}/{Tasks,Notes,Changelog} headings. They
 | 
			
		||||
          ;; support `:parents' to specify what headings to put them under, e.g.
 | 
			
		||||
          ;; :parents ("Projects")
 | 
			
		||||
          ("o" "Centralized templates for projects")
 | 
			
		||||
          ("ot" "Project todo" entry
 | 
			
		||||
           (function +org-capture-central-project-todo-file)
 | 
			
		||||
           "* TODO %?\n %i\n %a"
 | 
			
		||||
           :heading "Tasks"
 | 
			
		||||
           :prepend nil)
 | 
			
		||||
          ("on" "Project notes" entry
 | 
			
		||||
           (function +org-capture-central-project-notes-file)
 | 
			
		||||
           "* %U %?\n %i\n %a"
 | 
			
		||||
           :heading "Notes"
 | 
			
		||||
           :prepend t)
 | 
			
		||||
          ("oc" "Project changelog" entry
 | 
			
		||||
           (function +org-capture-central-project-changelog-file)
 | 
			
		||||
           "* %U %?\n %i\n %a"
 | 
			
		||||
           :heading "Changelog"
 | 
			
		||||
           :prepend t)
 | 
			
		||||
 | 
			
		||||
          ;; org books / general logging
 | 
			
		||||
          ("b" "Book log / General log (org)" item (function org-books-visit-book-log)
 | 
			
		||||
           "- %U %?" :prepend t)
 | 
			
		||||
 | 
			
		||||
          ;; zettelkasten
 | 
			
		||||
          ("s" "Slipbox" entry  (file "roam/inbox.org")
 | 
			
		||||
           "* %U %?\n")
 | 
			
		||||
          ("S" "Slipbox link" entry  (file "roam/inbox.org")
 | 
			
		||||
           "* %U %?\n %i\n %a")))
 | 
			
		||||
 | 
			
		||||
  (setq org-attach-directory "~/notebook/images/attach/")
 | 
			
		||||
)
 | 
			
		||||
;;; end of (!after org ...
 | 
			
		||||
 | 
			
		||||
;;; for testing
 | 
			
		||||
(defun org-wild-notifier-debug ()
 | 
			
		||||
  "Collect debug information for org-wild-notifier"
 | 
			
		||||
  (interactive)
 | 
			
		||||
  (save-window-excursion
 | 
			
		||||
    (let ((org-agenda-use-time-grid nil)
 | 
			
		||||
          (org-agenda-compact-blocks t)
 | 
			
		||||
          (org-agenda-window-setup 'current-window)
 | 
			
		||||
          (org-agenda-buffer-name nil)
 | 
			
		||||
          (org-agenda-buffer-tmp-name org-wild-notifier--agenda-buffer-name))
 | 
			
		||||
 | 
			
		||||
      (org-agenda-list 2)
 | 
			
		||||
      (message "registered events: %s \n blacklist: %s \n whitelist: %s \n"
 | 
			
		||||
               (org-wild-notifier--retrieve-events)
 | 
			
		||||
               org-wild-notifier-keyword-blacklist
 | 
			
		||||
               org-wild-notifier-keyword-whitelist)
 | 
			
		||||
 | 
			
		||||
      (message "filtered events: %s"
 | 
			
		||||
               (->> (org-wild-notifier--retrieve-events)
 | 
			
		||||
                    (-map 'org-wild-notifier--check-event)))
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
      (kill-buffer))))
 | 
			
		||||
 | 
			
		||||
(defun org-wild-notifier-alert-test ()
 | 
			
		||||
  (interactive)
 | 
			
		||||
  (alert "test")
 | 
			
		||||
)
 | 
			
		||||
;;; end
 | 
			
		||||
 | 
			
		||||
(defun agenda/hide-daily-schedule-1 (&optional arg)
 | 
			
		||||
(defun agenda/hide-daily-tasks (&optional arg)
 | 
			
		||||
  (interactive "P")
 | 
			
		||||
  (let ((org-agenda-tag-filter-preset '("-daily_tasks")))
 | 
			
		||||
   (org-agenda arg "a")))
 | 
			
		||||
(defun agenda/hide-habits (&optional arg)
 | 
			
		||||
  (interactive "P")
 | 
			
		||||
  (let ((org-agenda-tag-filter-preset '("-habits")))
 | 
			
		||||
   (org-agenda arg "a")))
 | 
			
		||||
(bind-key "<f5>" 'agenda/hide-daily-schedule-1)
 | 
			
		||||
(defun agenda/hide-todos (&optional arg)
 | 
			
		||||
  (interactive "P")
 | 
			
		||||
  (let ((org-agenda-tag-filter-preset '("-todo")))
 | 
			
		||||
   (org-agenda arg "a")))
 | 
			
		||||
 | 
			
		||||
;;; termux specific
 | 
			
		||||
;(setq browse-url-browser-function 'browse-url-generic
 | 
			
		||||
;      browse-url-generic-program "termux-open")
 | 
			
		||||
 | 
			
		||||
(defun jethro/org-archive-done-tasks ()
 | 
			
		||||
  "Archive all done tasks."
 | 
			
		||||
  (interactive)
 | 
			
		||||
  (org-map-entries 'org-archive-subtree "/DONE" 'file))
 | 
			
		||||
 | 
			
		||||
(require 'org-download)
 | 
			
		||||
(setq-default
 | 
			
		||||
 org-download-method 'directory
 | 
			
		||||
 ;; org-download-screenshot-method "grimshot save window %s"
 | 
			
		||||
 ;; org-download-screenshot-method "wl-paste -t image/png > '%s'"
 | 
			
		||||
 ;; below script is available on dotfiles: ../.local/bin
 | 
			
		||||
 org-download-screenshot-method "convert-paste-png.sh '%s'"
 | 
			
		||||
 org-download-abbreviate-filename-function 'concat
 | 
			
		||||
 org-download-image-dir "~/notebook/images/org-download"
 | 
			
		||||
 org-download-heading-lvl nil
 | 
			
		||||
 org-download-timestamp "%Y%m%d-%H%M%S_")
 | 
			
		||||
(add-hook 'dired-mode-hook 'org-download-enable)
 | 
			
		||||
(map! :leader
 | 
			
		||||
      (:prefix ("i". "insert")
 | 
			
		||||
       :desc "insert image from clipboard" "Y" #'org-download-screenshot))
 | 
			
		||||
      (:prefix-map ("o" . "open")
 | 
			
		||||
       (:prefix ("a" . "org agenda")
 | 
			
		||||
        :desc "Eisenhower Matrix"           "e" #'+eisenhower-matrix/make-eisenhower-matrix ;; classic eisenhower matrix
 | 
			
		||||
        (:prefix-map ("h" . "hide filter agenda")
 | 
			
		||||
         :desc "Agenda without daily tasks" "d"  #'agenda/hide-daily-tasks
 | 
			
		||||
         :desc "Agenda without habits"      "h"  #'agenda/hide-habits
 | 
			
		||||
         :desc "Agenda without todo"        "t"  #'agenda/hide-todos
 | 
			
		||||
         :desc "Just agenda"                "a"  #'org-agenda-list) ;; TODO reset keybind
 | 
			
		||||
        (:prefix-map ("w" . "workspaces")
 | 
			
		||||
         :desc "Eisenhower Matrix"               "e" #'+eisenhower-matrix/make-eisenhower-matrix ;; classic eisenhower matrix
 | 
			
		||||
         :desc "Schedule/Eisenhower-list/todo"   "t"  #'+todo-workspaces/make-todo-workspace
 | 
			
		||||
         :desc "Schedule/Eisenhower-list"        "s"  #'+todo-workspaces/make-todo-workspace-min)
 | 
			
		||||
        )))
 | 
			
		||||
 | 
			
		||||
;; disable flyspell-mode
 | 
			
		||||
(setq-default spell-checking-enable-by-default nil)
 | 
			
		||||
(map! :leader
 | 
			
		||||
      (:prefix-map ("o" . "open")
 | 
			
		||||
       (:prefix-map ("w" . "workspaces")
 | 
			
		||||
        :desc "Eisenhower Matrix"           "e" #'+eisenhower-matrix/make-eisenhower-matrix ;; classic eisenhower matrix
 | 
			
		||||
        :desc "Schedule/Eisenhower-list/todo"   "t"  #'+todo-workspaces/make-todo-workspace
 | 
			
		||||
        :desc "Schedule/Eisenhower-list"        "s"  #'+todo-workspaces/make-todo-workspace-min)
 | 
			
		||||
        ))
 | 
			
		||||
 | 
			
		||||
;;; copying images into org
 | 
			
		||||
(after! org-download
 | 
			
		||||
  (setq-default
 | 
			
		||||
   org-download-method 'directory
 | 
			
		||||
   ;; org-download-screenshot-method "grimshot save window %s"
 | 
			
		||||
   ;; org-download-screenshot-method "wl-paste -t image/png > '%s'"
 | 
			
		||||
   ;; below script is available on dotfiles: ../.local/bin
 | 
			
		||||
   org-download-screenshot-method "convert-paste-png.sh '%s'"
 | 
			
		||||
   org-download-abbreviate-filename-function 'concat
 | 
			
		||||
   org-download-image-dir "~/notebook/images/org-download"
 | 
			
		||||
   org-download-heading-lvl nil
 | 
			
		||||
   org-download-timestamp "%Y%m%d-%H%M%S_")
 | 
			
		||||
  (add-hook 'dired-mode-hook 'org-download-enable)
 | 
			
		||||
  (map! :leader
 | 
			
		||||
        (:prefix ("i". "insert")
 | 
			
		||||
         :desc "insert image from clipboard" "Y" #'org-download-screenshot)))
 | 
			
		||||
 | 
			
		||||
;;; reading epubs
 | 
			
		||||
(use-package! nov
 | 
			
		||||
  :mode ("\\.epub\\'" . nov-mode)
 | 
			
		||||
  :config
 | 
			
		||||
  (setq nov-save-place-file (concat doom-cache-dir "nov-places")
 | 
			
		||||
        ;nov-text-width t
 | 
			
		||||
        ;nov-text-width 80
 | 
			
		||||
        ;nov-variable-pitch nil
 | 
			
		||||
        )
 | 
			
		||||
  ;(advice-add 'nov-render-title :override #'ignore)
 | 
			
		||||
  ;(defun +nov-mode-setup ()
 | 
			
		||||
    ;(variable-pitch-mode 1)
 | 
			
		||||
    ;(hide-mode-line-mode 1)
 | 
			
		||||
    ;(require 'visual-fill-column nil t)
 | 
			
		||||
    ;(setq-local visual-fill-column-center-text t)
 | 
			
		||||
    ;(setq-local visual-fill-column-width 91)
 | 
			
		||||
    ;)
 | 
			
		||||
  ;(add-hook 'nov-mode-hook #'+nov-mode-setup)
 | 
			
		||||
  (add-hook 'nov-mode-hook 'visual-line-mode)
 | 
			
		||||
  (add-hook 'nov-mode-hook 'variable-pitch-mode)
 | 
			
		||||
  ;(add-hook 'nov-mode-hook 'visual-fill-column-mode)
 | 
			
		||||
  )
 | 
			
		||||
 | 
			
		||||
;;; org-publish (wip)
 | 
			
		||||
(setq org-publish-use-timestamps-flag nil
 | 
			
		||||
      org-export-with-broken-links t
 | 
			
		||||
      org-html-link-org-files-as-html t
 | 
			
		||||
      org-html-link-use-abs-url t
 | 
			
		||||
      org-html-validation-link nil            ;; Don't show validation link
 | 
			
		||||
      ;org-html-head-include-scripts nil       ;; Use our own scripts
 | 
			
		||||
      ;org-html-head-include-default-style nil ;; Use our own styles
 | 
			
		||||
      ;org-html-head "<link rel=\"stylesheet\" href=\"https://cdn.simplecss.org/simple.min.css\" />"
 | 
			
		||||
      org-html-head "<link rel=\"stylesheet\" href=\"/style.css\" /><link rel=\"stylesheet\" href=\"/syntax.css\" />"
 | 
			
		||||
      org-publish-project-alist
 | 
			
		||||
      (list
 | 
			
		||||
       (list "org-site:main"
 | 
			
		||||
             :recursive t
 | 
			
		||||
             :base-directory "~/notebook/blog/"
 | 
			
		||||
             :publishing-directory "~/output/public"
 | 
			
		||||
             :publishing-function 'org-html-publish-to-html
 | 
			
		||||
             :with-author nil
 | 
			
		||||
             :with-creator t
 | 
			
		||||
             :with-toc nil
 | 
			
		||||
             :html-link-use-abs-url t
 | 
			
		||||
             :exclude "default.org"
 | 
			
		||||
             :section-numbers nil
 | 
			
		||||
             :with-timestamps nil)
 | 
			
		||||
       (list "org-site:assets"
 | 
			
		||||
             :base-directory "~/notebook/blog/"
 | 
			
		||||
             :base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|woff2\\|ttf"
 | 
			
		||||
             :publishing-directory "~/output/public"
 | 
			
		||||
             :recursive t
 | 
			
		||||
             :publishing-function 'org-publish-attachment)))
 | 
			
		||||
 | 
			
		||||
(defvar dw/site-url (if (string-equal (getenv "CI") "true")
 | 
			
		||||
                        "https://example.org"
 | 
			
		||||
                      "http://localhost:8080")
 | 
			
		||||
  "The URL for the site being generated.")
 | 
			
		||||
 | 
			
		||||
(setq webfeeder-title-function 'webfeeder-title-libxml
 | 
			
		||||
      webfeeder-date-function 'webfeeder-date-libxml)
 | 
			
		||||
 | 
			
		||||
(defun my/org-publish ()
 | 
			
		||||
  "publish all including rss"
 | 
			
		||||
    (interactive)
 | 
			
		||||
 (start-process-shell-command "delete public html directory" nil "rm -r ~/output/public/*")
 | 
			
		||||
 (org-publish-all t)
 | 
			
		||||
 (webfeeder-build "rss.xml"
 | 
			
		||||
                  "~/output/public"
 | 
			
		||||
                  dw/site-url
 | 
			
		||||
                  (let ((default-directory (expand-file-name "~/output/public/")))
 | 
			
		||||
                       (directory-files-recursively default-directory
 | 
			
		||||
                                                    ".*\\.html$"))
 | 
			
		||||
                  :builder 'webfeeder-make-rss
 | 
			
		||||
                  :title "Rss"
 | 
			
		||||
                  :description "Rss"
 | 
			
		||||
                  :author "John Doe")
 | 
			
		||||
 (message "Build complete"))
 | 
			
		||||
(defun my/http-serve-blog ()
 | 
			
		||||
  (interactive)
 | 
			
		||||
  (httpd-serve-directory "~/output/public")
 | 
			
		||||
  (start-process-shell-command "open browser" nil "$BROWSER http://localhost:8080")
 | 
			
		||||
 ;(start-process-shell-command "Start http server at public html directory" nil "http-server ~/output/public/")
 | 
			
		||||
 )
 | 
			
		||||
(defun my/blog-refresh ()
 | 
			
		||||
  (interactive)
 | 
			
		||||
  (my/org-publish)
 | 
			
		||||
  (httpd-stop)
 | 
			
		||||
  (my/http-serve-blog))
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										35
									
								
								home/default/.config/doom/config/+centaur-tabs-config.el
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										35
									
								
								home/default/.config/doom/config/+centaur-tabs-config.el
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,35 @@
 | 
			
		||||
;;; ../../git/cho@gitea.bubbletea.dev/dotfiles/home/default/.config/doom/centaur-tabs-config.el -*- lexical-binding: t; -*-
 | 
			
		||||
 | 
			
		||||
(use-package! centaur-tabs
 | 
			
		||||
  :hook (doom-first-file . centaur-tabs-mode)
 | 
			
		||||
  :init
 | 
			
		||||
  (setq centaur-tabs-set-icons t
 | 
			
		||||
        centaur-tabs-gray-out-icons 'buffer
 | 
			
		||||
        ;centaur-tabs-set-bar 'left
 | 
			
		||||
        centaur-tabs-set-bar 'over
 | 
			
		||||
        ;centaur-tabs-style "bar"
 | 
			
		||||
        centaur-tabs-set-modified-marker t
 | 
			
		||||
        centaur-tabs-close-button "✕"
 | 
			
		||||
        centaur-tabs-modified-marker "•"
 | 
			
		||||
        centaur-tabs-icon-type 'nerd-icons
 | 
			
		||||
        ;; Scrolling (with the mouse wheel) past the end of the tab list
 | 
			
		||||
        ;; replaces the tab list with that of another Doom workspace. This
 | 
			
		||||
        ;; prevents that.
 | 
			
		||||
        centaur-tabs-cycle-scope 'tabs)
 | 
			
		||||
  (map! :leader
 | 
			
		||||
        :desc "Toggle tabs local display" "t c" #'centaur-tabs-local-mode
 | 
			
		||||
        :desc "Toggle tabs globally" "t C" #'centaur-tabs-mode
 | 
			
		||||
        :desc "Kill this tab" "t d" #'kill-this-buffer
 | 
			
		||||
        :desc "Create a tab" "t n" #'centaur-tabs--create-new-tab)
 | 
			
		||||
  ;(evil-define-key 'normal centaur-tabs-mode-map (kbd "g C-t") 'centaur-tabs--create-new-tab
 | 
			
		||||
                                                ; (kbd "g C-d") 'kill-this-buffer
 | 
			
		||||
                                                ; (kbd "g C-c") 'centaur-tabs-mode
 | 
			
		||||
                                                ; (kbd "g C-f") 'centaur-tabs-local-mode)
 | 
			
		||||
  :config
 | 
			
		||||
  ;(add-hook! '(+doom-dashboard-mode-hook +popup-buffer-mode-hook)
 | 
			
		||||
  (add-hook! '(+doom-dashboard-mode-hook +popup-buffer-mode-hook org-agenda-mode-hook)
 | 
			
		||||
    (defun +tabs-disable-centaur-tabs-mode-maybe-h ()
 | 
			
		||||
      "Disable `centaur-tabs-mode' in current buffer."
 | 
			
		||||
      (when (centaur-tabs-mode-on-p)
 | 
			
		||||
        (centaur-tabs-local-mode))))
 | 
			
		||||
  )
 | 
			
		||||
							
								
								
									
										18
									
								
								home/default/.config/doom/config/+eisenhower-matrix-list.el
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								home/default/.config/doom/config/+eisenhower-matrix-list.el
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,18 @@
 | 
			
		||||
;;; ../../git/cho@gitea.bubbletea.dev/dotfiles/home/default/.config/doom/+eisenhower-matrix-list.el -*- lexical-binding: t; -*-
 | 
			
		||||
 | 
			
		||||
(after! org-agenda
 | 
			
		||||
  (add-to-list 'org-agenda-custom-commands
 | 
			
		||||
               '("x" "Eisenhower Matrix (list)"
 | 
			
		||||
                 ((tags-todo
 | 
			
		||||
                   "+PRIORITY=\"A\"-habits+todo"
 | 
			
		||||
                   ((org-agenda-overriding-header "Urgent and important")))
 | 
			
		||||
                  (tags-todo
 | 
			
		||||
                   "+PRIORITY=\"B\"-habits+todo"
 | 
			
		||||
                   ((org-agenda-overriding-header "Important but not urgent")))
 | 
			
		||||
                  (tags-todo
 | 
			
		||||
                   "+PRIORITY=\"C\"-habits+todo"
 | 
			
		||||
                   ((org-agenda-overriding-header "Urgent but not important")))
 | 
			
		||||
                  (tags-todo
 | 
			
		||||
                   "+PRIORITY=0-PRIORITY=\"A\"-PRIORITY=\"B\"-PRIORITY=\"C\"-habits+todo"
 | 
			
		||||
                   ((org-agenda-overriding-header "Neither important nor urgent"))))
 | 
			
		||||
                 nil)))
 | 
			
		||||
							
								
								
									
										112
									
								
								home/default/.config/doom/config/+eisenhower-matrix.el
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										112
									
								
								home/default/.config/doom/config/+eisenhower-matrix.el
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,112 @@
 | 
			
		||||
;;; ../../git/cho@gitea.bubbletea.dev/dotfiles/home/default/.config/doom/eisenhower-matrix.el -*- lexical-binding: t; -*-
 | 
			
		||||
 | 
			
		||||
(after! org-agenda
 | 
			
		||||
;;; begin eisenhower matrix
 | 
			
		||||
(add-to-list 'org-agenda-custom-commands
 | 
			
		||||
             '("1" "Eisenhower matrix"
 | 
			
		||||
               ((tags-todo
 | 
			
		||||
                 "+PRIORITY=\"A\"-habits+todo"
 | 
			
		||||
                 ((org-agenda-overriding-header "Urgent and important"))))
 | 
			
		||||
              nil))
 | 
			
		||||
 | 
			
		||||
(add-to-list 'org-agenda-custom-commands
 | 
			
		||||
             '("2" "Eisenhower matrix"
 | 
			
		||||
               ((tags-todo
 | 
			
		||||
                 "+PRIORITY=\"B\"-habits+todo"
 | 
			
		||||
                 ((org-agenda-overriding-header "Important but not urgent"))))
 | 
			
		||||
              nil))
 | 
			
		||||
 | 
			
		||||
(add-to-list 'org-agenda-custom-commands
 | 
			
		||||
             '("3" "Eisenhower matrix"
 | 
			
		||||
               ((tags-todo
 | 
			
		||||
                 "+PRIORITY=\"C\"-habits+todo"
 | 
			
		||||
                 ((org-agenda-overriding-header "Urgent but not important"))))
 | 
			
		||||
              nil))
 | 
			
		||||
 | 
			
		||||
(add-to-list 'org-agenda-custom-commands
 | 
			
		||||
             '("4" "Eisenhower matrix"
 | 
			
		||||
               ((tags-todo
 | 
			
		||||
                 "+PRIORITY=0-PRIORITY=\"A\"-PRIORITY=\"B\"-PRIORITY=\"C\"-habits+todo"
 | 
			
		||||
                 ;"+PRIORITY=0+PRIORITY=\"D\"-habits+todo"
 | 
			
		||||
                 ((org-agenda-overriding-header "Neither important nor urgent"))))
 | 
			
		||||
              nil))
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
;-----------------------------------------------------------
 | 
			
		||||
 | 
			
		||||
;(org-toggle-sticky-agenda) ;generate differens agendas buffers in separated windows
 | 
			
		||||
;(setq org-agenda-sticky t)  ;generate differens agendas buffers in separated windows
 | 
			
		||||
 | 
			
		||||
(defun +eisenhower-matrix/agenda-1 ()
 | 
			
		||||
  (interactive)
 | 
			
		||||
  (org-agenda nil "1"))
 | 
			
		||||
 | 
			
		||||
;(global-set-key (kbd "C-c C-x C-d") '+eisenhower-matrix/agenda-1)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
(defun +eisenhower-matrix/agenda-2 ()
 | 
			
		||||
  (interactive)
 | 
			
		||||
  (org-agenda nil "2"))
 | 
			
		||||
 | 
			
		||||
;(global-set-key (kbd "C-c C-x C-l") '+eisenhower-matrix/agenda-2)
 | 
			
		||||
 | 
			
		||||
(defun +eisenhower-matrix/agenda-3 ()
 | 
			
		||||
  (interactive)
 | 
			
		||||
  (org-agenda nil "3"))
 | 
			
		||||
 | 
			
		||||
;(global-set-key (kbd "C-c C-x C-r") '+eisenhower-matrix/agenda-3)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
(defun +eisenhower-matrix/agenda-4 ()
 | 
			
		||||
  (interactive)
 | 
			
		||||
  (org-agenda nil "4"))
 | 
			
		||||
 | 
			
		||||
;(global-set-key (kbd "C-c C-x C-p") '+eisenhower-matrix/agenda-4)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
(defun split-4-ways ()
 | 
			
		||||
  (interactive)
 | 
			
		||||
  (delete-other-windows)
 | 
			
		||||
  (split-window-right)
 | 
			
		||||
  (split-window-below)
 | 
			
		||||
  (windmove-right)
 | 
			
		||||
  (split-window-below)
 | 
			
		||||
  (windmove-left))
 | 
			
		||||
;(global-set-key (kbd "C-c C-x C-u") 'split-4-ways)
 | 
			
		||||
 | 
			
		||||
(defun +eisenhower-matrix/redo-all-agenda-buffers ()
 | 
			
		||||
  (interactive)
 | 
			
		||||
  (dolist (buffer (buffer-list))
 | 
			
		||||
    (with-current-buffer buffer
 | 
			
		||||
      (when (derived-mode-p 'org-agenda-mode)
 | 
			
		||||
        (org-agenda-redo t)))))
 | 
			
		||||
 | 
			
		||||
(defun +eisenhower-matrix/make-agendas ()
 | 
			
		||||
 (interactive)
 | 
			
		||||
  (+eisenhower-matrix/redo-all-agenda-buffers)
 | 
			
		||||
  (+eisenhower-matrix/agenda-1)
 | 
			
		||||
  (hide-mode-line-mode)
 | 
			
		||||
  (+eisenhower-matrix/agenda-2)
 | 
			
		||||
  (hide-mode-line-mode)
 | 
			
		||||
  (+eisenhower-matrix/agenda-3)
 | 
			
		||||
  (hide-mode-line-mode)
 | 
			
		||||
  (+eisenhower-matrix/agenda-4)
 | 
			
		||||
  (hide-mode-line-mode)
 | 
			
		||||
  )
 | 
			
		||||
;(global-set-key (kbd "C-c C-x C-t") '+eisenhower-matrix/make-agendas)
 | 
			
		||||
 | 
			
		||||
(defun +eisenhower-matrix/make-eisenhower-matrix ()
 | 
			
		||||
 (interactive)
 | 
			
		||||
 (+eisenhower-matrix/make-agendas) ;it opens: *Org Agenda(1)*, *Org Agenda(2)*, *Org Agenda(3)*, *Org Agenda(4)*
 | 
			
		||||
 (split-4-ways)  ;make the 4 quadrant windows
 | 
			
		||||
 (switch-to-buffer  "*Org Agenda(1)*")  ;put the Agenda(1) in the left, up quadrant
 | 
			
		||||
 (windmove-right)
 | 
			
		||||
 (switch-to-buffer  "*Org Agenda(2)*")  ;put the Agenda(2) in the right, up quadrant
 | 
			
		||||
 (windmove-down)
 | 
			
		||||
 (switch-to-buffer  "*Org Agenda(4)*")  ;put the Agenda(3) in the left, down quadrant
 | 
			
		||||
 (windmove-left)
 | 
			
		||||
 (switch-to-buffer  "*Org Agenda(3)*")  ;put the Agenda(4) in the right, down quadrant
 | 
			
		||||
 )
 | 
			
		||||
 | 
			
		||||
;;; end eisenhower matrix
 | 
			
		||||
)
 | 
			
		||||
							
								
								
									
										105
									
								
								home/default/.config/doom/config/+org-capture-config.el
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										105
									
								
								home/default/.config/doom/config/+org-capture-config.el
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,105 @@
 | 
			
		||||
;;; ../../git/cho@gitea.bubbletea.dev/dotfiles/home/default/.config/doom/org-capture-config.el -*- lexical-binding: t; -*-
 | 
			
		||||
 | 
			
		||||
(after! org
 | 
			
		||||
 | 
			
		||||
  ;; examples: file:~/.emacs.d/modules/lang/org/config.el
 | 
			
		||||
  ;;           file:~/.emacs.d/modules/lang/org/autoload/org-capture.el
 | 
			
		||||
 | 
			
		||||
  ;; set locations personal and centralized files
 | 
			
		||||
 | 
			
		||||
  (defvar +org-capture-refile-file "ag/refile.org")
 | 
			
		||||
  (defun +org-capture-refile-file ()
 | 
			
		||||
    (expand-file-name +org-capture-refile-file org-directory))
 | 
			
		||||
  (defvar +org-capture-todo-custom-file "ag/todo.org")
 | 
			
		||||
  (defun +org-capture-todo-custom-file ()
 | 
			
		||||
    (expand-file-name +org-capture-todo-custom-file org-directory))
 | 
			
		||||
  (defvar +org-capture-custom-projects-file "ag/projects.org")
 | 
			
		||||
  (defun +org-capture-custom-central-project-todo-file ()
 | 
			
		||||
    "TODO"
 | 
			
		||||
    (+org--capture-central-file
 | 
			
		||||
     +org-capture-custom-projects-file (projectile-project-name)))
 | 
			
		||||
  (defun +org-capture-custom-central-project-notes-file ()
 | 
			
		||||
    "TODO"
 | 
			
		||||
    (+org--capture-central-file
 | 
			
		||||
     +org-capture-custom-projects-file (projectile-project-name)))
 | 
			
		||||
  (defun +org-capture-custom-central-project-changelog-file ()
 | 
			
		||||
    "TODO"
 | 
			
		||||
    (+org--capture-central-file
 | 
			
		||||
     +org-capture-custom-projects-file (projectile-project-name)))
 | 
			
		||||
 | 
			
		||||
  ;(add-to-list 'org-capture-templates
 | 
			
		||||
  ;      '(("s" "Slipbox" entry  (file "braindump/org/inbox.org")
 | 
			
		||||
  ;       "* %?\n")
 | 
			
		||||
  ;        ("t" "Personal todo" entry
 | 
			
		||||
  ;         (file+headline +org-capture-todo-file "Inbox")
 | 
			
		||||
  ;         "* [ ] %?\n%i\n%a" :prepend t)
 | 
			
		||||
  ;      )
 | 
			
		||||
 | 
			
		||||
  (setq org-capture-templates
 | 
			
		||||
        '(("t" "Personal todo" entry
 | 
			
		||||
          (file+headline +org-capture-todo-custom-file "todo")
 | 
			
		||||
          "* TODO %?\n%i\n%a" :prepend t)
 | 
			
		||||
          ("T" "Personal todo (no link)" entry
 | 
			
		||||
          (file+headline +org-capture-todo-custom-file "todo")
 | 
			
		||||
          "* TODO %?\n" :prepend t)
 | 
			
		||||
 | 
			
		||||
          ;;; i never use this
 | 
			
		||||
          ;("n" "Personal notes" entry
 | 
			
		||||
          ;(file+headline +org-capture-notes-file "Inbox")
 | 
			
		||||
          ;"* %u %?\n%i\n%a" :prepend t)
 | 
			
		||||
          ("r" "Personal refile file" entry
 | 
			
		||||
          (file +org-capture-refile-file)
 | 
			
		||||
          "* %u %?\n%i\n%a" :prepend t)
 | 
			
		||||
 | 
			
		||||
          ;; using org-journal atm, i will likely never use this
 | 
			
		||||
          ;("j" "Journal" entry
 | 
			
		||||
          ;(file+olp+datetree +org-capture-journal-file)
 | 
			
		||||
          ;"* %U %?\n%i\n%a" :prepend t)
 | 
			
		||||
 | 
			
		||||
          ;; Will use {project-root}/{todo,notes,changelog}.org, unless a
 | 
			
		||||
          ;; {todo,notes,changelog}.org file is found in a parent directory.
 | 
			
		||||
          ;; Uses the basename from `+org-capture-todo-file',
 | 
			
		||||
          ;; `+org-capture-changelog-file' and `+org-capture-notes-file'.
 | 
			
		||||
          ("p" "Templates for projects")
 | 
			
		||||
          ("pt" "Project-local todo" entry  ; {project-root}/todo.org
 | 
			
		||||
           (file+headline +org-capture-project-todo-file "Inbox")
 | 
			
		||||
           "* TODO %?\n%i\n%a" :prepend t)
 | 
			
		||||
          ("pn" "Project-local notes" entry  ; {project-root}/notes.org
 | 
			
		||||
           (file+headline +org-capture-project-notes-file "Inbox")
 | 
			
		||||
           "* %U %?\n%i\n%a" :prepend t)
 | 
			
		||||
          ("pc" "Project-local changelog" entry  ; {project-root}/changelog.org
 | 
			
		||||
           (file+headline +org-capture-project-changelog-file "Unreleased")
 | 
			
		||||
           "* %U %?\n%i\n%a" :prepend t)
 | 
			
		||||
 | 
			
		||||
          ;; reference for function: [[file:~/.emacs.d/modules/lang/org/autoload/org-capture.el::defun +org--capture-central-file (file project]]
 | 
			
		||||
          ;; Will use {org-directory}/{+org-capture-projects-file} and store
 | 
			
		||||
          ;; these under {ProjectName}/{Tasks,Notes,Changelog} headings. They
 | 
			
		||||
          ;; support `:parents' to specify what headings to put them under, e.g.
 | 
			
		||||
          ;; :parents ("Projects")
 | 
			
		||||
          ("o" "Centralized templates for projects")
 | 
			
		||||
          ("ot" "Project todo" entry
 | 
			
		||||
           (function +org-capture-custom-central-project-todo-file)
 | 
			
		||||
           "* TODO %?\n %i\n %a"
 | 
			
		||||
           :heading "Tasks"
 | 
			
		||||
           :prepend nil)
 | 
			
		||||
          ("on" "Project notes" entry
 | 
			
		||||
           (function +org-capture-custom-central-project-notes-file)
 | 
			
		||||
           "* %U %?\n %i\n %a"
 | 
			
		||||
           :heading "Notes"
 | 
			
		||||
           :prepend t)
 | 
			
		||||
          ("oc" "Project changelog" entry
 | 
			
		||||
           (function +org-capture-custom-central-project-changelog-file)
 | 
			
		||||
           "* %U %?\n %i\n %a"
 | 
			
		||||
           :heading "Changelog"
 | 
			
		||||
           :prepend t)
 | 
			
		||||
 | 
			
		||||
          ;; org books / general logging
 | 
			
		||||
          ("b" "Book log / General log (org)" item (function org-books-visit-book-log)
 | 
			
		||||
           "- %U %?" :prepend t)
 | 
			
		||||
 | 
			
		||||
          ;; zettelkasten
 | 
			
		||||
          ("s" "Slipbox" entry  (file "roam/inbox.org")
 | 
			
		||||
           "* %U %?\n")
 | 
			
		||||
          ("S" "Slipbox link" entry  (file "roam/inbox.org")
 | 
			
		||||
           "* %U %?\n %i\n %a")))
 | 
			
		||||
)
 | 
			
		||||
							
								
								
									
										50
									
								
								home/default/.config/doom/config/+org-pomodoro-config.el
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										50
									
								
								home/default/.config/doom/config/+org-pomodoro-config.el
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,50 @@
 | 
			
		||||
;;; ../../git/cho@gitea.bubbletea.dev/dotfiles/home/default/.config/doom/+org-pomodoro-config.el -*- lexical-binding: t; -*-
 | 
			
		||||
 | 
			
		||||
(after! org-pomodoro
 | 
			
		||||
  (setq org-pomodoro-ask-upon-killing t
 | 
			
		||||
        org-pomodoro-keep-killed-pomodoro-time t
 | 
			
		||||
        org-pomodoro-length 25
 | 
			
		||||
        org-pomodoro-manual-break t)
 | 
			
		||||
 | 
			
		||||
  (defun +org-pomodoro/3-5 ()
 | 
			
		||||
  "Set Pomodoro intervals to 3-5"
 | 
			
		||||
      (interactive)
 | 
			
		||||
    (setq org-pomodoro-length 3)
 | 
			
		||||
    (setq org-pomodoro-short-break-length 5)
 | 
			
		||||
    (message "Pomodoro set to 3-5" (buffer-name)))
 | 
			
		||||
  (defun +org-pomodoro/5-5 ()
 | 
			
		||||
  "Set Pomodoro intervals to 5-5"
 | 
			
		||||
      (interactive)
 | 
			
		||||
    (setq org-pomodoro-length 5)
 | 
			
		||||
    (setq org-pomodoro-short-break-length 5)
 | 
			
		||||
    (message "Pomodoro set to 3-5" (buffer-name)))
 | 
			
		||||
  (defun +org-pomodoro/10-5 ()
 | 
			
		||||
  "Set Pomodoro intervals to 10-5"
 | 
			
		||||
      (interactive)
 | 
			
		||||
    (setq org-pomodoro-length 10)
 | 
			
		||||
    (setq org-pomodoro-short-break-length 5)
 | 
			
		||||
    (message "Pomodoro set to 10-5" (buffer-name)))
 | 
			
		||||
  (defun +org-pomodoro/15-5 ()
 | 
			
		||||
  "Set Pomodoro intervals to 15-5"
 | 
			
		||||
      (interactive)
 | 
			
		||||
    (setq org-pomodoro-length 15)
 | 
			
		||||
    (setq org-pomodoro-short-break-length 5)
 | 
			
		||||
    (message "Pomodoro set to 15-5" (buffer-name)))
 | 
			
		||||
  (defun +org-pomodoro/25-5 ()
 | 
			
		||||
  "Set Pomodoro intervals to 25-5"
 | 
			
		||||
      (interactive)
 | 
			
		||||
    (setq org-pomodoro-length 25)
 | 
			
		||||
    (setq org-pomodoro-short-break-length 5)
 | 
			
		||||
    (message "Pomodoro set to 25-5" (buffer-name)))
 | 
			
		||||
  (defun +org-pomodoro/30-10 ()
 | 
			
		||||
  "Set Pomodoro intervals to 30-10"
 | 
			
		||||
      (interactive)
 | 
			
		||||
    (setq org-pomodoro-length 30)
 | 
			
		||||
    (setq org-pomodoro-short-break-length 10)
 | 
			
		||||
    (message "Pomodoro set to 30-10" (buffer-name)))
 | 
			
		||||
  (defun +org-pomodoro/50-10 ()
 | 
			
		||||
  "Set Pomodoro intervals to 50-10"
 | 
			
		||||
      (interactive)
 | 
			
		||||
    (setq org-pomodoro-length 50)
 | 
			
		||||
    (setq org-pomodoro-short-break-length 10)
 | 
			
		||||
    (message "Pomodoro set to 50-10" (buffer-name))))
 | 
			
		||||
							
								
								
									
										65
									
								
								home/default/.config/doom/config/+org-roam-config.el
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										65
									
								
								home/default/.config/doom/config/+org-roam-config.el
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,65 @@
 | 
			
		||||
;;; ../../git/cho@gitea.bubbletea.dev/dotfiles/home/default/.config/doom/+org-roam-templates.el -*- lexical-binding: t; -*-
 | 
			
		||||
 | 
			
		||||
;; org-roam configurations
 | 
			
		||||
(use-package! org-roam
 | 
			
		||||
  :init
 | 
			
		||||
  :custom
 | 
			
		||||
  (org-roam-directory "~/notebook/roam/" )
 | 
			
		||||
  (org-roam-dailies-capture-templates
 | 
			
		||||
   '(("d" "default" entry "* %<%I:%M %p>: %?"
 | 
			
		||||
      :if-new (file+head "%<%Y-%m-%d>.org" "#+title: %<%Y-%m-%d>\n")))))
 | 
			
		||||
 | 
			
		||||
;; looks
 | 
			
		||||
;(cl-defmethod org-roam-node-type ((node org-roam-node))
 | 
			
		||||
;  "Return the TYPE of NODE."
 | 
			
		||||
;  (condition-case nil
 | 
			
		||||
;      (file-name-nondirectory
 | 
			
		||||
;       (directory-file-name
 | 
			
		||||
;        (file-name-directory
 | 
			
		||||
;         (file-relative-name (org-roam-node-file node) org-roam-directory))))
 | 
			
		||||
;    (error "")))
 | 
			
		||||
 | 
			
		||||
;(setq org-roam-node-display-template
 | 
			
		||||
;      (concat "${type:15} ${title:*} " (propertize "${tags:10}" 'face 'org-tag)))
 | 
			
		||||
 | 
			
		||||
(setq org-roam-capture-templates
 | 
			
		||||
  '(("d" "default" plain "%?"
 | 
			
		||||
     :target (file+head "%<%Y%m%d%H%M%S>-${slug}.org"
 | 
			
		||||
                        "#+title: ${title}\n")
 | 
			
		||||
     :unnarrowed t)
 | 
			
		||||
    ;; main things
 | 
			
		||||
    ("l" "literature" plain "%?"
 | 
			
		||||
     :if-new
 | 
			
		||||
     (file+head "literature/%<%Y%m%d%H%M%S>-${title}.org" "#+title: ${title}\n")
 | 
			
		||||
     :immediate-finish t
 | 
			
		||||
     :unnarrowed t)
 | 
			
		||||
    ("p" "permanent" plain "%?"
 | 
			
		||||
     :if-new
 | 
			
		||||
     (file+head "permanent/%<%Y%m%d%H%M%S>-${title}.org" "#+title: ${title}\n")
 | 
			
		||||
     :immediate-finish t
 | 
			
		||||
     :unnarrowed t)
 | 
			
		||||
 | 
			
		||||
    ;; now using inbox.org via org-capture
 | 
			
		||||
    ;("f" "fleeting" plain "%?"
 | 
			
		||||
    ; :if-new
 | 
			
		||||
    ; (file+head "fleeting/%<%Y%m%d%H%M%S>-${title}.org" "#+title: ${title}\n")
 | 
			
		||||
    ; :immediate-finish t
 | 
			
		||||
    ; :unnarrowed t)
 | 
			
		||||
 | 
			
		||||
    ;; other categories
 | 
			
		||||
    ;("r" "reference" plain "%?"
 | 
			
		||||
    ; :if-new
 | 
			
		||||
    ; (file+head "reference/%<%Y%m%d%H%M%S>-${title}.org" "#+title: ${title}\n")
 | 
			
		||||
    ; :immediate-finish t
 | 
			
		||||
    ; :unnarrowed t)
 | 
			
		||||
    ;("a" "article" plain "%?"
 | 
			
		||||
    ; :if-new
 | 
			
		||||
    ; (file+head "articles/%<%Y%m%d%H%M%S>-${title}.org" "#+title: ${title}\n#+filetags: :article:\n")
 | 
			
		||||
    ; :immediate-finish t
 | 
			
		||||
    ; :unnarrowed t)
 | 
			
		||||
 | 
			
		||||
    ("s" "school" plain "%?"
 | 
			
		||||
     :if-new
 | 
			
		||||
     (file+head "school/%<%Y%m%d%H%M%S>-${title}.org" "#+title: ${title}\n")
 | 
			
		||||
     :immediate-finish t
 | 
			
		||||
     :unnarrowed t)))
 | 
			
		||||
@@ -0,0 +1,41 @@
 | 
			
		||||
;;; ../../git/cho@gitea.bubbletea.dev/dotfiles/home/default/.config/doom/+org-wild-notifier-config.el -*- lexical-binding: t; -*-
 | 
			
		||||
 | 
			
		||||
  ;; NOTIFICATIONS CONFIGURATION REFERENCE
 | 
			
		||||
  ;;; note : it's probably better to add this after
 | 
			
		||||
  ;;;        setting org-agenda-files.
 | 
			
		||||
  ;;;        use this under (!after org ...
 | 
			
		||||
  ;;;        else it would't work
 | 
			
		||||
  ;
 | 
			
		||||
  ;(use-package! org-wild-notifier
 | 
			
		||||
  ;  :defer t
 | 
			
		||||
  ;  :init
 | 
			
		||||
  ;  (add-hook 'doom-post-init-hook (org-wild-notifier-mode))
 | 
			
		||||
  ;  :config
 | 
			
		||||
  ;  (setq alert-default-style 'libnotify)
 | 
			
		||||
  ;;; set to libnotify or notifications or osx-notifier
 | 
			
		||||
  ;  (setq org-wild-notifier-alert-time '(60 30))
 | 
			
		||||
  ;;; alert time defaults to '(10) if not set
 | 
			
		||||
  ;  (setq org-wild-notifier-keyword-whitelist nil))
 | 
			
		||||
  ;  (setq org-wild-notifier-keyword-blacklist '("DONE"))
 | 
			
		||||
 | 
			
		||||
  (use-package! org-wild-notifier
 | 
			
		||||
    :init
 | 
			
		||||
    (add-hook 'doom-post-init-hook (org-wild-notifier-mode))
 | 
			
		||||
    :config
 | 
			
		||||
    (require 'org-duration)
 | 
			
		||||
    ;(setq alert-default-style 'libnotify)
 | 
			
		||||
    (setq org-wild-notifier-alert-time '(10 0))
 | 
			
		||||
    (setq org-wild-notifier-keyword-whitelist nil)
 | 
			
		||||
    (setq org-wild-notifier-keyword-blacklist '("DONE"))
 | 
			
		||||
    (alert-add-rule :category "org-wild-notifier"
 | 
			
		||||
                    :style (cond (alert-libnotify-command
 | 
			
		||||
                                  'libnotify)
 | 
			
		||||
                                 (alert-default-style))))
 | 
			
		||||
 | 
			
		||||
;;; play audio for for alerts
 | 
			
		||||
(defun +org-wild-notifier/play-sound () (interactive) (start-process-shell-command "org-wild-notifier-audio-player" nil "mpg123 ~/resources/sounds/alerts/metal-gear-item-drop.mp3")) (defadvice org-wild-notifier--notify (after org-wild-notifier--play-sound-after-notify activate) (+org-wild-notifier/play-sound))
 | 
			
		||||
 | 
			
		||||
;;; for testing notifications
 | 
			
		||||
(defun org-wild-notifier-alert-test ()
 | 
			
		||||
  (interactive)
 | 
			
		||||
  (alert "test" :category 'org-wild-notifier))
 | 
			
		||||
							
								
								
									
										13
									
								
								home/default/.config/doom/config/+termux-config.el
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								home/default/.config/doom/config/+termux-config.el
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,13 @@
 | 
			
		||||
;;; ../../git/cho@gitea.bubbletea.dev/dotfiles/home/default/.config/doom/+termux-config.el -*- lexical-binding: t; -*-
 | 
			
		||||
 | 
			
		||||
;; termux specific
 | 
			
		||||
(setq browse-url-browser-function 'browse-url-generic
 | 
			
		||||
      browse-url-generic-program "termux-open"
 | 
			
		||||
      alert-default-style 'termux
 | 
			
		||||
      org-pomodoro-audio-player nil) ;; VERY LOUD! DISABLE.
 | 
			
		||||
 | 
			
		||||
(after! org-pomodoro
 | 
			
		||||
  (alert-add-rule :category "org-pomodoro"
 | 
			
		||||
                  :style (cond (alert-termux-command
 | 
			
		||||
                                'termux)
 | 
			
		||||
                               (alert-default-style))))
 | 
			
		||||
							
								
								
									
										62
									
								
								home/default/.config/doom/config/+todo-workspaces.el
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										62
									
								
								home/default/.config/doom/config/+todo-workspaces.el
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,62 @@
 | 
			
		||||
;;; +todo-workspaces.el --- Description -*- lexical-binding: t; -*-
 | 
			
		||||
(after! org
 | 
			
		||||
(defun +todo-workspaces/agenda1 ()
 | 
			
		||||
  ;(interactive)
 | 
			
		||||
  (org-agenda nil "a")
 | 
			
		||||
  )
 | 
			
		||||
(defun +todo-workspaces/agenda2 ()
 | 
			
		||||
  (interactive)
 | 
			
		||||
  (org-agenda nil "x"))
 | 
			
		||||
(defun +todo-workspaces/make-todo-agendas ()
 | 
			
		||||
  ;(interactive)
 | 
			
		||||
  (+todo-workspaces/agenda1)
 | 
			
		||||
  (hide-mode-line-mode)
 | 
			
		||||
  (+todo-workspaces/agenda2)
 | 
			
		||||
  (hide-mode-line-mode))
 | 
			
		||||
(defun +todo-workspaces/split-todo-workspace ()
 | 
			
		||||
  ;(interactive)
 | 
			
		||||
  (delete-other-windows)
 | 
			
		||||
  (split-window-below)
 | 
			
		||||
  (windmove-down)
 | 
			
		||||
  (split-window-right)
 | 
			
		||||
  (windmove-up)
 | 
			
		||||
  )
 | 
			
		||||
(defun +todo-workspaces/split-todo-workspace-min ()
 | 
			
		||||
  ;(interactive)
 | 
			
		||||
  (delete-other-windows)
 | 
			
		||||
  (split-window-below)
 | 
			
		||||
  )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
(defun +todo-workspaces/redo-all-agenda-buffers ()
 | 
			
		||||
  (interactive)
 | 
			
		||||
  (dolist (buffer (buffer-list))
 | 
			
		||||
    (with-current-buffer buffer
 | 
			
		||||
      (when (derived-mode-p 'org-agenda-mode)
 | 
			
		||||
        (org-agenda-redo t)))))
 | 
			
		||||
 | 
			
		||||
(defun +todo-workspaces/make-todo-workspace ()
 | 
			
		||||
  (interactive)
 | 
			
		||||
  ;(+todo-workspaces/redo-all-agenda-buffers)
 | 
			
		||||
  (+todo-workspaces/make-todo-agendas)
 | 
			
		||||
  (+todo-workspaces/split-todo-workspace)
 | 
			
		||||
  (switch-to-buffer  "*Org Agenda(a)*")
 | 
			
		||||
  (windmove-down)
 | 
			
		||||
  (switch-to-buffer  "*Org Agenda(x)*")
 | 
			
		||||
  (windmove-right)
 | 
			
		||||
  (find-file "~/notebook/ag/todo.org")
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
(defun +todo-workspaces/make-todo-workspace-min ()
 | 
			
		||||
  (interactive)
 | 
			
		||||
  ;(+todo-workspaces/redo-all-agenda-buffers)
 | 
			
		||||
  (+todo-workspaces/make-todo-agendas)
 | 
			
		||||
  (+todo-workspaces/split-todo-workspace-min)
 | 
			
		||||
  (switch-to-buffer  "*Org Agenda(a)*")
 | 
			
		||||
  (windmove-down)
 | 
			
		||||
  (switch-to-buffer  "*Org Agenda(x)*")
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
(provide '+todo-workspaces)
 | 
			
		||||
)
 | 
			
		||||
;;; +todo-workspaces.el ends here
 | 
			
		||||
@@ -44,7 +44,7 @@
 | 
			
		||||
       ophints           ; highlight the region an operation acts on
 | 
			
		||||
       (popup +defaults)   ; tame sudden yet inevitable temporary windows
 | 
			
		||||
       ;;tabs              ; a tab bar for Emacs
 | 
			
		||||
       ;;treemacs          ; a project drawer, like neotree but cooler
 | 
			
		||||
       treemacs          ; a project drawer, like neotree but cooler
 | 
			
		||||
       ;;unicode           ; extended unicode support for various languages
 | 
			
		||||
       (vc-gutter +pretty) ; vcs diff in the fringe
 | 
			
		||||
       vi-tilde-fringe   ; fringe tildes to mark beyond EOB
 | 
			
		||||
@@ -75,8 +75,8 @@
 | 
			
		||||
 | 
			
		||||
       :term
 | 
			
		||||
       eshell            ; the elisp shell that works everywhere
 | 
			
		||||
       ;;shell             ; simple shell REPL for Emacs
 | 
			
		||||
       ;;term              ; basic terminal emulator for Emacs
 | 
			
		||||
       shell             ; simple shell REPL for Emacs
 | 
			
		||||
       term              ; basic terminal emulator for Emacs
 | 
			
		||||
       vterm             ; the best terminal emulation in Emacs
 | 
			
		||||
 | 
			
		||||
       :checkers
 | 
			
		||||
@@ -105,12 +105,13 @@
 | 
			
		||||
       ;;taskrunner        ; taskrunner for all your projects
 | 
			
		||||
       ;;terraform         ; infrastructure as code
 | 
			
		||||
       ;;tmux              ; an API for interacting with tmux
 | 
			
		||||
       ;;tree-sitter       ; syntax and parsing, sitting in a tree...
 | 
			
		||||
       tree-sitter       ; syntax and parsing, sitting in a tree...
 | 
			
		||||
       ;;upload            ; map local to remote projects via ssh/ftp
 | 
			
		||||
 | 
			
		||||
       :os
 | 
			
		||||
       (:if IS-MAC macos)  ; improve compatibility with macOS
 | 
			
		||||
       ;;tty               ; improve the terminal Emacs experience
 | 
			
		||||
       tty               ; improve the terminal Emacs experience
 | 
			
		||||
       ;; note for termux, install Termux Api on fdroid and install termux-api from pkg install
 | 
			
		||||
 | 
			
		||||
       :lang
 | 
			
		||||
       ;;agda              ; types of types of types of types...
 | 
			
		||||
@@ -141,7 +142,7 @@
 | 
			
		||||
       ;;hy                ; readability of scheme w/ speed of python
 | 
			
		||||
       ;;idris             ; a language you can depend on
 | 
			
		||||
       ;;json              ; At least it ain't XML
 | 
			
		||||
       ;;(java +lsp)       ; the poster child for carpal tunnel syndrome
 | 
			
		||||
       (java +lsp)       ; the poster child for carpal tunnel syndrome
 | 
			
		||||
       ;;javascript        ; all(hope(abandon(ye(who(enter(here))))))
 | 
			
		||||
       ;;julia             ; a better, faster MATLAB
 | 
			
		||||
       ;;kotlin            ; a better, slicker Java(Script)
 | 
			
		||||
@@ -157,6 +158,10 @@
 | 
			
		||||
        +journal
 | 
			
		||||
        +habit
 | 
			
		||||
        +roam2
 | 
			
		||||
        +dragndrop
 | 
			
		||||
        +pomodoro
 | 
			
		||||
        +publish
 | 
			
		||||
        ;+pretty
 | 
			
		||||
        )                  ; organize your plain life in plain text
 | 
			
		||||
       ;;php               ; perl's insecure younger brother
 | 
			
		||||
       ;;plantuml          ; diagrams for confusing people more
 | 
			
		||||
@@ -189,7 +194,7 @@
 | 
			
		||||
       ;;calendar
 | 
			
		||||
       ;;emms
 | 
			
		||||
       ;;everywhere        ; *leave* Emacs!? You must be joking
 | 
			
		||||
       ;;irc               ; how neckbeards socialize
 | 
			
		||||
       irc               ; how neckbeards socialize
 | 
			
		||||
       ;;(rss +org)        ; emacs as an RSS reader
 | 
			
		||||
       ;;twitter           ; twitter client https://twitter.com/vnought
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,11 +1,12 @@
 | 
			
		||||
;;; org-wild-notifier.el --- Customizable org-agenda notifications -*- lexical-binding: t -*-
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
;; Copyright (C) 2017 Artem Khramov
 | 
			
		||||
 | 
			
		||||
;; Author: Artem Khramov <akhramov+emacs@pm.me>
 | 
			
		||||
;; Created: 6 Jan 2017
 | 
			
		||||
;; Version: 0.4.1
 | 
			
		||||
;; Package-Requires: ((alert "1.2") (async "1.9.3") (dash "2.18.0") (emacs "24.4"))
 | 
			
		||||
;; Version: 0.5.0
 | 
			
		||||
;; Package-Requires: ((alert "1.2") (async "1.9.3") (dash "2.18.0") (emacs "26.1"))
 | 
			
		||||
;; Keywords: notification alert org org-agenda agenda
 | 
			
		||||
;; URL: https://github.com/akhramov/org-wild-notifier.el
 | 
			
		||||
 | 
			
		||||
@@ -48,7 +49,7 @@
 | 
			
		||||
(require 'async)
 | 
			
		||||
(require 'org-agenda)
 | 
			
		||||
(require 'cl-lib)
 | 
			
		||||
 | 
			
		||||
(require 'org-duration)
 | 
			
		||||
 | 
			
		||||
(defgroup org-wild-notifier nil
 | 
			
		||||
  "org-wild-notifier customization options"
 | 
			
		||||
@@ -81,7 +82,7 @@ to an event."
 | 
			
		||||
  :group 'org-wild-notifier
 | 
			
		||||
  :type 'string)
 | 
			
		||||
 | 
			
		||||
(defcustom org-wild-notifier-keyword-whitelist '("TODO")
 | 
			
		||||
(defcustom org-wild-notifier-keyword-whitelist nil
 | 
			
		||||
  "Receive notifications for these keywords only.
 | 
			
		||||
Leave this variable blank if you do not want to filter anything."
 | 
			
		||||
  :package-version '(org-wild-notifier . "0.2.2")
 | 
			
		||||
@@ -107,6 +108,38 @@ Leave this variable blank if you do not want to filter anything."
 | 
			
		||||
  :group 'org-wild-notifier
 | 
			
		||||
  :type '(repeat string))
 | 
			
		||||
 | 
			
		||||
(defcustom org-wild-notifier-display-time-format-string "%I:%M %p"
 | 
			
		||||
  "The format string that should be passed to `format-time-string' to display a time."
 | 
			
		||||
  :package-version '(org-wild-notifier . "0.5.0")
 | 
			
		||||
  :group 'org-wild-notifier
 | 
			
		||||
  :type 'string)
 | 
			
		||||
 | 
			
		||||
(defcustom org-wild-notifier-predicate-whitelist nil
 | 
			
		||||
  "Receive notifications for events matching these predicates only.
 | 
			
		||||
Each function should take an event POM and return non-nil iff that event should
 | 
			
		||||
trigger a notification. Leave this variable blank if you do not want to filter
 | 
			
		||||
anything."
 | 
			
		||||
  :package-version '(org-wild-notifier . "0.5.0")
 | 
			
		||||
  :group 'org-wild-notifier
 | 
			
		||||
  :type '(function))
 | 
			
		||||
 | 
			
		||||
(defcustom org-wild-notifier-additional-environment-regexes nil
 | 
			
		||||
  "Additional regular expressions that should be provided to
 | 
			
		||||
`async-inject-environment' before running the async command to
 | 
			
		||||
check notifications."
 | 
			
		||||
  :package-version '(org-wild-notifier . "0.5.0")
 | 
			
		||||
  :group 'org-wild-notifier
 | 
			
		||||
  :type '(string))
 | 
			
		||||
 | 
			
		||||
(defcustom org-wild-notifier-predicate-blacklist
 | 
			
		||||
  '(org-wild-notifier-done-keywords-predicate)
 | 
			
		||||
  "Never receive notifications for events matching these predicates.
 | 
			
		||||
Each function should take an event POM and return non-nil iff that event should
 | 
			
		||||
not trigger a notification."
 | 
			
		||||
  :package-version '(org-wild-notifier . "0.5.0")
 | 
			
		||||
  :group 'org-wild-notifier
 | 
			
		||||
  :type '(function))
 | 
			
		||||
 | 
			
		||||
(defcustom org-wild-notifier--alert-severity 'medium
 | 
			
		||||
  "Severity of the alert.
 | 
			
		||||
options: 'high 'medium 'low"
 | 
			
		||||
@@ -115,8 +148,23 @@ options: 'high 'medium 'low"
 | 
			
		||||
  :type 'symbol
 | 
			
		||||
  :options '(high medium low))
 | 
			
		||||
 | 
			
		||||
(defvar org-wild-notifier--day-wide-events nil
 | 
			
		||||
  "If truthy, notifies about day-wide events.")
 | 
			
		||||
(defcustom org-wild-notifier-extra-alert-plist nil
 | 
			
		||||
  "Additional arguments that should be passed to invocations of `alert'."
 | 
			
		||||
  :package-version "v0.5.0"
 | 
			
		||||
  :group 'org-wild-notifier
 | 
			
		||||
  :type 'plist)
 | 
			
		||||
 | 
			
		||||
(defcustom org-wild-notifier-day-wide-alert-times nil
 | 
			
		||||
  "A list of time of day strings at which alerts for day wide events should trigger."
 | 
			
		||||
  :package-version '(org-wild-notifier . "0.5.0")
 | 
			
		||||
  :group 'org-wild-notifier
 | 
			
		||||
  :type 'string)
 | 
			
		||||
 | 
			
		||||
(defcustom org-wild-notifier-show-any-overdue-with-day-wide-alerts t
 | 
			
		||||
  "Show any overdue TODO items along with day wide alerts whenever they are shown."
 | 
			
		||||
  :package-version '(org-wild-notifier . "0.5.0")
 | 
			
		||||
  :group 'org-wild-notifier
 | 
			
		||||
  :type 'string)
 | 
			
		||||
 | 
			
		||||
(defvar org-wild-notifier--timer nil
 | 
			
		||||
  "Timer value.")
 | 
			
		||||
@@ -145,16 +193,6 @@ in order to ignore seconds."
 | 
			
		||||
  (apply 'encode-time
 | 
			
		||||
         (append '(0 0 0) (nthcdr 3 (decode-time (current-time))))))
 | 
			
		||||
 | 
			
		||||
(defun org-wild-notifier--always-notify-p (event)
 | 
			
		||||
  "Check that notification for the EVENT should be done regardless of time.
 | 
			
		||||
For now, the only case that handled is day-wide events."
 | 
			
		||||
  (when org-wild-notifier--day-wide-events
 | 
			
		||||
    (let ((today (org-wild-notifier--today)))
 | 
			
		||||
      ;; SPIKE: Org timestamps without "time" section are shorter than
 | 
			
		||||
      ;; 16 characters.
 | 
			
		||||
      (--any-p (and (<= (length (car it)) 16) (equal today (cdr it)))
 | 
			
		||||
               (cadr (assoc 'times event))))))
 | 
			
		||||
 | 
			
		||||
(defun org-wild-notifier--timestamp-within-interval-p (timestamp interval)
 | 
			
		||||
  "Check whether TIMESTAMP is within notification INTERVAL."
 | 
			
		||||
  (org-wild-notifier--time=
 | 
			
		||||
@@ -163,14 +201,22 @@ For now, the only case that handled is day-wide events."
 | 
			
		||||
 | 
			
		||||
(defun org-wild-notifier--notifications (event)
 | 
			
		||||
  "Get notifications for given EVENT.
 | 
			
		||||
Returns a list of notification intervals."
 | 
			
		||||
  (if (org-wild-notifier--always-notify-p event)
 | 
			
		||||
      '(-1)
 | 
			
		||||
Returns a list of time information interval pairs."
 | 
			
		||||
  (->> (list
 | 
			
		||||
        (org-wild-notifier--filter-day-wide-events (cadr (assoc 'times event)))
 | 
			
		||||
        (cdr (assoc 'intervals event)))
 | 
			
		||||
         (apply '-table-flat (lambda (ts int) (list ts int)))
 | 
			
		||||
         ;; When no values are provided for table flat, we get the second values
 | 
			
		||||
         ;; paired with nil.
 | 
			
		||||
         (--filter (not (null (car it))))
 | 
			
		||||
         (--filter (org-wild-notifier--timestamp-within-interval-p (cdar it) (cadr it)))))
 | 
			
		||||
 | 
			
		||||
    (->> `(,(cadr (assoc 'times event)) ,(cdr (assoc 'intervals event)))
 | 
			
		||||
         (apply '-table-flat (lambda (ts int) `(,(cdr ts) ,int)))
 | 
			
		||||
         (--filter (apply 'org-wild-notifier--timestamp-within-interval-p it))
 | 
			
		||||
         (-map 'cadr))))
 | 
			
		||||
(defun org-wild-notifier--has-timestamp (s)
 | 
			
		||||
  (string-match org-ts-regexp0 s)
 | 
			
		||||
  (match-beginning 7))
 | 
			
		||||
 | 
			
		||||
(defun org-wild-notifier--filter-day-wide-events (times)
 | 
			
		||||
  (--filter (org-wild-notifier--has-timestamp (car it)) times))
 | 
			
		||||
 | 
			
		||||
(defun org-wild-notifier--time-left (seconds)
 | 
			
		||||
  "Human-friendly representation for SECONDS."
 | 
			
		||||
@@ -184,9 +230,9 @@ Returns a list of notification intervals."
 | 
			
		||||
 | 
			
		||||
(defun org-wild-notifier--get-hh-mm-from-org-time-string (time-string)
 | 
			
		||||
  "Convert given org time-string TIME-STRING into string with 'hh:mm' format."
 | 
			
		||||
  (if (>= (length time-string) 22)
 | 
			
		||||
      (substring time-string 16 21)
 | 
			
		||||
      "00:00"))
 | 
			
		||||
  (format-time-string
 | 
			
		||||
   org-wild-notifier-display-time-format-string
 | 
			
		||||
   (encode-time (org-parse-time-string time-string))))
 | 
			
		||||
 | 
			
		||||
(defun org-wild-notifier--notification-text (str-interval event)
 | 
			
		||||
  "For given STR-INTERVAL list and EVENT get notification wording."
 | 
			
		||||
@@ -195,12 +241,64 @@ Returns a list of notification intervals."
 | 
			
		||||
          (org-wild-notifier--get-hh-mm-from-org-time-string (car str-interval))
 | 
			
		||||
          (org-wild-notifier--time-left (* 60 (cdr str-interval)))))
 | 
			
		||||
 | 
			
		||||
(defun org-wild-notifier-get-minutes-into-day (time)
 | 
			
		||||
  (org-duration-to-minutes (org-get-time-of-day time t)))
 | 
			
		||||
 | 
			
		||||
(defun org-wild-notifier-get-hours-minutes-from-time (time-string)
 | 
			
		||||
  (let ((total-minutes (truncate (org-wild-notifier-get-minutes-into-day time-string))))
 | 
			
		||||
    (list (/ total-minutes 60)
 | 
			
		||||
          (mod total-minutes 60))))
 | 
			
		||||
 | 
			
		||||
(defun org-wild-notifier-set-hours-minutes-for-time (time hours minutes)
 | 
			
		||||
  (cl-destructuring-bind (_s _m _h day month year dow dst utcoff) (decode-time time)
 | 
			
		||||
    (encode-time 0 minutes hours day month year dow dst utcoff)))
 | 
			
		||||
 | 
			
		||||
(defun org-wild-notifier-current-time-matches-time-of-day-string (time-of-day-string)
 | 
			
		||||
  (let ((now (current-time)))
 | 
			
		||||
    (org-wild-notifier--time=
 | 
			
		||||
     now
 | 
			
		||||
     (apply 'org-wild-notifier-set-hours-minutes-for-time
 | 
			
		||||
            now
 | 
			
		||||
            (org-wild-notifier-get-hours-minutes-from-time time-of-day-string)))))
 | 
			
		||||
 | 
			
		||||
(defun org-wild-notifier-current-time-is-day-wide-time ()
 | 
			
		||||
  (--any (org-wild-notifier-current-time-matches-time-of-day-string it)
 | 
			
		||||
         org-wild-notifier-day-wide-alert-times))
 | 
			
		||||
 | 
			
		||||
(defun org-wild-notifier-day-wide-notifications (events)
 | 
			
		||||
  (->> events
 | 
			
		||||
       (-filter 'org-wild-notifier-display-as-day-wide-event)
 | 
			
		||||
       (-map 'org-wild-notifier--day-wide-notification-text)
 | 
			
		||||
       (-uniq)))
 | 
			
		||||
 | 
			
		||||
(defun org-wild-notifier-display-as-day-wide-event (event)
 | 
			
		||||
  ;; `org-wild-notifier-event-has-any-passed-time' event is a requirement,
 | 
			
		||||
  ;; regardless of whether
 | 
			
		||||
  ;; `org-wild-notifier-show-any-overdue-with-day-wide-alerts' is set because
 | 
			
		||||
  ;; the events list can include events scheduled tomorrow. We only want to
 | 
			
		||||
  ;; alert for things scheduled today.
 | 
			
		||||
  (and (org-wild-notifier-event-has-any-passed-time event)
 | 
			
		||||
      (or org-wild-notifier-show-any-overdue-with-day-wide-alerts
 | 
			
		||||
           (org-wild-notifier-event-has-any-day-wide-timestamp event))))
 | 
			
		||||
 | 
			
		||||
(defun org-wild-notifier-event-has-any-day-wide-timestamp (event)
 | 
			
		||||
  (--any (not (org-wild-notifier--has-timestamp (car it)))
 | 
			
		||||
         (car (cdr (assoc 'times event)))))
 | 
			
		||||
 | 
			
		||||
(defun org-wild-notifier-event-has-any-passed-time (event)
 | 
			
		||||
  (--any (time-less-p (cdr it) (current-time))
 | 
			
		||||
         (car (cdr (assoc 'times event )))))
 | 
			
		||||
 | 
			
		||||
(defun org-wild-notifier--day-wide-notification-text (event)
 | 
			
		||||
  "For given STR-INTERVAL list and EVENT get notification wording."
 | 
			
		||||
  (format "%s is due or scheduled today"
 | 
			
		||||
          (cdr (assoc 'title event))))
 | 
			
		||||
 | 
			
		||||
(defun org-wild-notifier--check-event (event)
 | 
			
		||||
  "Get notifications for given EVENT.
 | 
			
		||||
Returns a list of notification messages"
 | 
			
		||||
  (->> (org-wild-notifier--notifications event)
 | 
			
		||||
       (--zip-with (cons (car it) other) (cadr (assoc 'times event)))
 | 
			
		||||
       (--map (org-wild-notifier--notification-text it event))))
 | 
			
		||||
       (--map (org-wild-notifier--notification-text `(,(caar it) . ,(cadr it)) event))))
 | 
			
		||||
 | 
			
		||||
(defun org-wild-notifier--get-tags (marker)
 | 
			
		||||
  "Retrieve tags of MARKER."
 | 
			
		||||
@@ -217,7 +315,11 @@ Returns a list of notification messages"
 | 
			
		||||
         [,org-wild-notifier-tags-whitelist
 | 
			
		||||
          (lambda (it)
 | 
			
		||||
            (-intersection org-wild-notifier-tags-whitelist
 | 
			
		||||
                           (org-wild-notifier--get-tags it)))])
 | 
			
		||||
                           (org-wild-notifier--get-tags it)))]
 | 
			
		||||
 | 
			
		||||
         [,org-wild-notifier-predicate-whitelist
 | 
			
		||||
          (lambda (marker)
 | 
			
		||||
            (--some? (funcall it marker) org-wild-notifier-predicate-whitelist))])
 | 
			
		||||
       (--filter (aref it 0))
 | 
			
		||||
       (--map (aref it 1))))
 | 
			
		||||
 | 
			
		||||
@@ -230,10 +332,20 @@ Returns a list of notification messages"
 | 
			
		||||
         [,org-wild-notifier-tags-blacklist
 | 
			
		||||
          (lambda (it)
 | 
			
		||||
            (-intersection org-wild-notifier-tags-blacklist
 | 
			
		||||
                           (org-wild-notifier--get-tags it)))])
 | 
			
		||||
                           (org-wild-notifier--get-tags it)))]
 | 
			
		||||
 | 
			
		||||
         [,org-wild-notifier-predicate-blacklist
 | 
			
		||||
          (lambda (marker)
 | 
			
		||||
            (--some? (funcall it marker) org-wild-notifier-predicate-blacklist))])
 | 
			
		||||
       (--filter (aref it 0))
 | 
			
		||||
       (--map (aref it 1))))
 | 
			
		||||
 | 
			
		||||
(defun org-wild-notifier-done-keywords-predicate (marker)
 | 
			
		||||
  (save-excursion
 | 
			
		||||
    (set-buffer (marker-buffer marker))
 | 
			
		||||
    (goto-char (marker-position marker))
 | 
			
		||||
    (member (nth 2 (org-heading-components)) org-done-keywords)))
 | 
			
		||||
 | 
			
		||||
(defun org-wild-notifier--apply-whitelist (markers)
 | 
			
		||||
  "Apply whitelist to MARKERS."
 | 
			
		||||
  (-if-let (whitelist-predicates (org-wild-notifier--whitelist-predicates))
 | 
			
		||||
@@ -248,51 +360,62 @@ Returns a list of notification messages"
 | 
			
		||||
          (-remove markers))
 | 
			
		||||
    markers))
 | 
			
		||||
 | 
			
		||||
(defconst org-wild-notifier-default-environment-regex
 | 
			
		||||
  (macroexpand
 | 
			
		||||
   `(rx string-start
 | 
			
		||||
        (or ,@(mapcar (lambda (literal) (list 'literal literal))
 | 
			
		||||
                (list
 | 
			
		||||
                 "org-agenda-files"
 | 
			
		||||
                 "load-path"
 | 
			
		||||
                 "org-todo-keywords"
 | 
			
		||||
                 "org-wild-notifier-alert-time"
 | 
			
		||||
                 "org-wild-notifier-keyword-whitelist"
 | 
			
		||||
                 "org-wild-notifier-keyword-blacklist"
 | 
			
		||||
                 "org-wild-notifier-tags-whitelist"
 | 
			
		||||
                 "org-wild-notifier-tags-blacklist"
 | 
			
		||||
                 "org-wild-notifier-predicate-whitelist"
 | 
			
		||||
                 "org-wild-notifier-predicate-blacklist")))
 | 
			
		||||
        string-end)))
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
(defun org-wild-notifier-environment-regex ()
 | 
			
		||||
  (macroexpand
 | 
			
		||||
   `(rx (or
 | 
			
		||||
         ,@(mapcar (lambda (regexp) (list 'regexp regexp))
 | 
			
		||||
                   (cons org-wild-notifier-default-environment-regex
 | 
			
		||||
                         org-wild-notifier-additional-environment-regexes))))))
 | 
			
		||||
 | 
			
		||||
(defun org-wild-notifier--retrieve-events ()
 | 
			
		||||
  "Get events from agenda view."
 | 
			
		||||
  (let ((agenda-files (-filter 'file-exists-p (org-agenda-files)))
 | 
			
		||||
        ;; Some package managers manipulate `load-path` variable.
 | 
			
		||||
        (my-load-path load-path)
 | 
			
		||||
        (todo-keywords org-todo-keywords)
 | 
			
		||||
        (alert-time org-wild-notifier-alert-time)
 | 
			
		||||
        (keyword-whitelist org-wild-notifier-keyword-whitelist)
 | 
			
		||||
        (keyword-blacklist org-wild-notifier-keyword-blacklist)
 | 
			
		||||
        (tags-whitelist org-wild-notifier-tags-whitelist)
 | 
			
		||||
        (tags-blacklist org-wild-notifier-tags-blacklist))
 | 
			
		||||
    (lambda ()
 | 
			
		||||
      (setf org-agenda-use-time-grid nil)
 | 
			
		||||
      (setf org-agenda-compact-blocks t)
 | 
			
		||||
      (setf org-agenda-files agenda-files)
 | 
			
		||||
      (setf load-path my-load-path)
 | 
			
		||||
      (setf org-todo-keywords todo-keywords)
 | 
			
		||||
      (setf org-wild-notifier-alert-time alert-time)
 | 
			
		||||
      (setf org-wild-notifier-keyword-whitelist keyword-whitelist)
 | 
			
		||||
      (setf org-wild-notifier-keyword-blacklist keyword-blacklist)
 | 
			
		||||
      (setf org-wild-notifier-tags-whitelist tags-whitelist)
 | 
			
		||||
      (setf org-wild-notifier-tags-blacklist tags-blacklist)
 | 
			
		||||
  `(lambda ()
 | 
			
		||||
    (setf org-agenda-use-time-grid nil)
 | 
			
		||||
    (setf org-agenda-compact-blocks t)
 | 
			
		||||
    ,(async-inject-variables (org-wild-notifier-environment-regex))
 | 
			
		||||
 | 
			
		||||
      (package-initialize)
 | 
			
		||||
      (require 'org-wild-notifier)
 | 
			
		||||
    (package-initialize)
 | 
			
		||||
    (require 'org-wild-notifier)
 | 
			
		||||
 | 
			
		||||
      (org-agenda-list 2
 | 
			
		||||
                       (org-read-date nil nil "today"))
 | 
			
		||||
    (org-agenda-list 2 (org-read-date nil nil "today"))
 | 
			
		||||
 | 
			
		||||
      (->> (org-split-string (buffer-string) "\n")
 | 
			
		||||
           (--map (plist-get
 | 
			
		||||
                   (org-fix-agenda-info (text-properties-at 0 it))
 | 
			
		||||
                   'org-marker))
 | 
			
		||||
           (-non-nil)
 | 
			
		||||
           (org-wild-notifier--apply-whitelist)
 | 
			
		||||
           (org-wild-notifier--apply-blacklist)
 | 
			
		||||
           (-map 'org-wild-notifier--gather-info)))))
 | 
			
		||||
    (->> (org-split-string (buffer-string) "\n")
 | 
			
		||||
         (--map (plist-get
 | 
			
		||||
                 (org-fix-agenda-info (text-properties-at 0 it))
 | 
			
		||||
                 'org-marker))
 | 
			
		||||
         (-non-nil)
 | 
			
		||||
         (org-wild-notifier--apply-whitelist)
 | 
			
		||||
         (org-wild-notifier--apply-blacklist)
 | 
			
		||||
         (-map 'org-wild-notifier--gather-info))))
 | 
			
		||||
 | 
			
		||||
(defun org-wild-notifier--notify (event-msg)
 | 
			
		||||
  "Notify about an event using `alert' library.
 | 
			
		||||
EVENT-MSG is a string representation of the event."
 | 
			
		||||
  (alert event-msg
 | 
			
		||||
         :icon org-wild-notifier-notification-icon
 | 
			
		||||
         :title org-wild-notifier-notification-title
 | 
			
		||||
         :severity org-wild-notifier--alert-severity))
 | 
			
		||||
  (apply
 | 
			
		||||
   'alert event-msg
 | 
			
		||||
   :icon org-wild-notifier-notification-icon
 | 
			
		||||
   :title org-wild-notifier-notification-title
 | 
			
		||||
   :severity org-wild-notifier--alert-severity
 | 
			
		||||
   :category 'org-wild-notifier
 | 
			
		||||
   org-wild-notifier-extra-alert-plist))
 | 
			
		||||
 | 
			
		||||
(defun org-wild-notifier--timestamp-parse (timestamp)
 | 
			
		||||
  (let ((parsed (org-parse-time-string timestamp))
 | 
			
		||||
@@ -307,8 +430,7 @@ EVENT-MSG is a string representation of the event."
 | 
			
		||||
       ;; so we have to add the minutes too
 | 
			
		||||
       (+ (* (decoded-time-hour parsed) 3600)
 | 
			
		||||
          (* (decoded-time-minute parsed) 60))))
 | 
			
		||||
     2)
 | 
			
		||||
))
 | 
			
		||||
     2)))
 | 
			
		||||
 | 
			
		||||
(defun org-wild-notifier--extract-time (marker)
 | 
			
		||||
  "Extract timestamps from MARKER.
 | 
			
		||||
@@ -359,36 +481,38 @@ MARKER acts like event's identifier."
 | 
			
		||||
Timer is scheduled on the beginning of every minute, so for
 | 
			
		||||
smoother experience this function also runs a check without timer."
 | 
			
		||||
  (org-wild-notifier--stop)
 | 
			
		||||
 | 
			
		||||
  (let ((org-wild-notifier--day-wide-events t))
 | 
			
		||||
    (org-wild-notifier-check))
 | 
			
		||||
  (org-wild-notifier-check)
 | 
			
		||||
 | 
			
		||||
  (--> (format-time-string "%H:%M" (time-add (current-time) 60))
 | 
			
		||||
       (run-at-time it 60 'org-wild-notifier-check)
 | 
			
		||||
       (setf org-wild-notifier--timer it)))
 | 
			
		||||
 | 
			
		||||
(defun org-wild-notifier--check-events (events)
 | 
			
		||||
  (setq org-wild-notifier--process nil)
 | 
			
		||||
  (-each
 | 
			
		||||
      (->> events
 | 
			
		||||
           (-map 'org-wild-notifier--check-event)
 | 
			
		||||
           (-flatten)
 | 
			
		||||
           (-uniq))
 | 
			
		||||
    'org-wild-notifier--notify)
 | 
			
		||||
  (when (org-wild-notifier-current-time-is-day-wide-time)
 | 
			
		||||
    (-map 'org-wild-notifier--notify
 | 
			
		||||
          (org-wild-notifier-day-wide-notifications events)))
 | 
			
		||||
  (setq org-wild-notifier--last-check-time (current-time)))
 | 
			
		||||
 | 
			
		||||
;;;###autoload
 | 
			
		||||
(defun org-wild-notifier-check ()
 | 
			
		||||
  "Parse agenda view and notify about upcoming events.
 | 
			
		||||
 | 
			
		||||
Do nothing if a check is already in progress in the background."
 | 
			
		||||
  (interactive)
 | 
			
		||||
 | 
			
		||||
  (unless (and org-wild-notifier--process
 | 
			
		||||
               (process-live-p org-wild-notifier--process))
 | 
			
		||||
    (setq org-wild-notifier--process
 | 
			
		||||
          (let ((default-directory user-emacs-directory))
 | 
			
		||||
            (async-start
 | 
			
		||||
             (org-wild-notifier--retrieve-events)
 | 
			
		||||
             (lambda (events)
 | 
			
		||||
               (setq org-wild-notifier--process nil)
 | 
			
		||||
               (-each
 | 
			
		||||
                   (->> events
 | 
			
		||||
                        (-map 'org-wild-notifier--check-event)
 | 
			
		||||
                        (-flatten)
 | 
			
		||||
                        (-uniq))
 | 
			
		||||
                 'org-wild-notifier--notify)
 | 
			
		||||
               (setq org-wild-notifier--last-check-time (current-time))))))))
 | 
			
		||||
             'org-wild-notifier--check-events)))))
 | 
			
		||||
 | 
			
		||||
;;;###autoload
 | 
			
		||||
(define-minor-mode org-wild-notifier-mode
 | 
			
		||||
 
 | 
			
		||||
@@ -56,8 +56,16 @@
 | 
			
		||||
;(package! org :pin "ca873f7")
 | 
			
		||||
 | 
			
		||||
(package! org-books)
 | 
			
		||||
(package! org-download)
 | 
			
		||||
 | 
			
		||||
;;; customized to support repeated tasks, see https://github.com/akhramov/org-wild-notifier.el/issues/41
 | 
			
		||||
(package! nov)
 | 
			
		||||
;(package! org-modern)
 | 
			
		||||
(package! org-wild-notifier
 | 
			
		||||
  :recipe (:local-repo "~/.config/doom/lisp/org-wild-notifier"))
 | 
			
		||||
  :recipe (:local-repo "lisp/org-wild-notifier"))
 | 
			
		||||
;(package! focus) ;; try
 | 
			
		||||
;(package! dimmer) ;; try
 | 
			
		||||
;(package! minions) ;; try
 | 
			
		||||
;(package! mini-frame) ;; try
 | 
			
		||||
(package! solaire-mode :disable t)
 | 
			
		||||
(package! simple-httpd)
 | 
			
		||||
(package! htmlize)
 | 
			
		||||
(package! esxml)
 | 
			
		||||
(package! webfeeder)
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										125
									
								
								home/default/.config/doom/themes/doom-tomorrow-night-r-theme.el
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										125
									
								
								home/default/.config/doom/themes/doom-tomorrow-night-r-theme.el
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,125 @@
 | 
			
		||||
;;; doom-tomorrow-night-r-theme.el --- One of the dark variants of Tomorrow -*- lexical-binding: t; no-byte-compile: t; -*-
 | 
			
		||||
;;
 | 
			
		||||
;; Added: May 14, 2017 (4c981f2cccf3)
 | 
			
		||||
;; Author: Henrik Lissner <https://github.com/hlissner>
 | 
			
		||||
;; Maintainer:
 | 
			
		||||
;; Source: https://github.com/ChrisKempson/Tomorrow-Theme
 | 
			
		||||
;;
 | 
			
		||||
;;; Commentary:
 | 
			
		||||
;;; Code:
 | 
			
		||||
 | 
			
		||||
(require 'doom-themes)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
;;
 | 
			
		||||
;;; Variables
 | 
			
		||||
 | 
			
		||||
(defgroup doom-tomorrow-night-r-theme nil
 | 
			
		||||
  "Options for the `doom-tomorrow-night-r' theme."
 | 
			
		||||
  :group 'doom-themes)
 | 
			
		||||
 | 
			
		||||
(defcustom doom-tomorrow-night-r-padded-modeline doom-themes-padded-modeline
 | 
			
		||||
  "If non-nil, adds a 4px padding to the mode-line. Can be an integer to
 | 
			
		||||
determine the exact padding."
 | 
			
		||||
  :group 'doom-tomorrow-night-r-theme
 | 
			
		||||
  :type '(choice integer boolean))
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
;;
 | 
			
		||||
;;; Theme definition
 | 
			
		||||
 | 
			
		||||
(def-doom-theme doom-tomorrow-night-r
 | 
			
		||||
  "A theme based off of Chris Kempson's Tomorrow Dark."
 | 
			
		||||
 | 
			
		||||
  ;; name        gui       256       16
 | 
			
		||||
  ;((bg         '("#1d1f21" nil       nil          ))
 | 
			
		||||
  ((bg         '("#161616" nil       nil          ))
 | 
			
		||||
   ;(bg-alt     '("#161719" nil       nil          ))
 | 
			
		||||
   (bg-alt     '("#161616" nil       nil          ))
 | 
			
		||||
   (base0      '("#0d0d0d" "black"   "black"      ))
 | 
			
		||||
   (base1      '("#1b1b1b" "#1b1b1b"              ))
 | 
			
		||||
   (base2      '("#212122" "#1e1e1e"              ))
 | 
			
		||||
   (base3      '("#292b2b" "#292929" "brightblack"))
 | 
			
		||||
   (base4      '("#3f4040" "#3f3f3f" "brightblack"))
 | 
			
		||||
   (base5      '("#5c5e5e" "#525252" "brightblack"))
 | 
			
		||||
   (base6      '("#757878" "#6b6b6b" "brightblack"))
 | 
			
		||||
   (base7      '("#969896" "#979797" "brightblack"))
 | 
			
		||||
   (base8      '("#ffffff" "#ffffff" "white"      ))
 | 
			
		||||
   (fg         '("#c5c8c6" "#c5c5c5" "white"))
 | 
			
		||||
   (fg-alt     (doom-darken fg 0.4))
 | 
			
		||||
 | 
			
		||||
   (grey       '("#5a5b5a" "#5a5a5a" "brightblack"))
 | 
			
		||||
   (red        '("#cc6666" "#cc6666" "red"))
 | 
			
		||||
   (orange     '("#de935f" "#dd9955" "brightred"))
 | 
			
		||||
   (yellow     '("#f0c674" "#f0c674" "yellow"))
 | 
			
		||||
   (green      '("#b5bd68" "#b5bd68" "green"))
 | 
			
		||||
   (blue       '("#81a2be" "#88aabb" "brightblue"))
 | 
			
		||||
   (dark-blue  '("#41728e" "#41728e" "blue"))
 | 
			
		||||
   (teal       blue) ; FIXME replace with real teal
 | 
			
		||||
   (magenta    '("#c9b4cf" "#c9b4cf" "magenta"))
 | 
			
		||||
   (violet     '("#b294bb" "#b294bb" "brightmagenta"))
 | 
			
		||||
   (cyan       '("#8abeb7" "#8abeb7" "cyan"))
 | 
			
		||||
   (dark-cyan  (doom-darken cyan 0.4))
 | 
			
		||||
 | 
			
		||||
   ;; face categories
 | 
			
		||||
   (highlight      blue)
 | 
			
		||||
   (vertical-bar   base0)
 | 
			
		||||
   (selection      `(,(car (doom-lighten bg 0.1)) ,@(cdr base4)))
 | 
			
		||||
   (builtin        blue)
 | 
			
		||||
   (comments       grey)
 | 
			
		||||
   (doc-comments   (doom-lighten grey 0.14))
 | 
			
		||||
   (constants      orange)
 | 
			
		||||
   (functions      blue)
 | 
			
		||||
   (keywords       violet)
 | 
			
		||||
   (methods        blue)
 | 
			
		||||
   (operators      fg)
 | 
			
		||||
   (type           yellow)
 | 
			
		||||
   (strings        green)
 | 
			
		||||
   (variables      red)
 | 
			
		||||
   (numbers        orange)
 | 
			
		||||
   (region         selection)
 | 
			
		||||
   (error          red)
 | 
			
		||||
   (warning        yellow)
 | 
			
		||||
   (success        green)
 | 
			
		||||
   (vc-modified    fg-alt)
 | 
			
		||||
   (vc-added       green)
 | 
			
		||||
   (vc-deleted     red)
 | 
			
		||||
 | 
			
		||||
   ;; custom categories
 | 
			
		||||
   (modeline-bg     `(,(doom-darken (car bg-alt) 0.3) ,@(cdr base3)))
 | 
			
		||||
   (modeline-bg-alt `(,(car bg) ,@(cdr base1)))
 | 
			
		||||
   (modeline-fg     base8)
 | 
			
		||||
   (modeline-fg-alt comments)
 | 
			
		||||
   (-modeline-pad
 | 
			
		||||
    (when doom-tomorrow-night-r-padded-modeline
 | 
			
		||||
      (if (integerp doom-tomorrow-night-r-padded-modeline)
 | 
			
		||||
          doom-tomorrow-night-r-padded-modeline
 | 
			
		||||
        4))))
 | 
			
		||||
 | 
			
		||||
  ;; --- faces ------------------------------
 | 
			
		||||
  (((line-number &override) :foreground base4)
 | 
			
		||||
   ((line-number-current-line &override) :foreground blue :bold bold)
 | 
			
		||||
   (mode-line
 | 
			
		||||
    :background modeline-bg :foreground modeline-fg
 | 
			
		||||
    :box (if -modeline-pad `(:line-width ,-modeline-pad :color ,modeline-bg)))
 | 
			
		||||
   (mode-line-inactive
 | 
			
		||||
    :background modeline-bg-alt :foreground modeline-fg-alt
 | 
			
		||||
    :box (if -modeline-pad `(:line-width ,-modeline-pad :color ,modeline-bg-alt)))
 | 
			
		||||
 | 
			
		||||
   ;;;; rainbow-delimiters
 | 
			
		||||
   (rainbow-delimiters-depth-1-face :foreground violet)
 | 
			
		||||
   (rainbow-delimiters-depth-2-face :foreground blue)
 | 
			
		||||
   (rainbow-delimiters-depth-3-face :foreground orange)
 | 
			
		||||
   (rainbow-delimiters-depth-4-face :foreground green)
 | 
			
		||||
   (rainbow-delimiters-depth-5-face :foreground magenta)
 | 
			
		||||
   (rainbow-delimiters-depth-6-face :foreground yellow)
 | 
			
		||||
   (rainbow-delimiters-depth-7-face :foreground teal)
 | 
			
		||||
   ;;;; doom-modeline
 | 
			
		||||
   (doom-modeline-buffer-path       :foreground violet :bold bold)
 | 
			
		||||
   (doom-modeline-buffer-major-mode :inherit 'doom-modeline-buffer-path))
 | 
			
		||||
 | 
			
		||||
  ;; --- variables --------------------------
 | 
			
		||||
  ;; ()
 | 
			
		||||
  )
 | 
			
		||||
 | 
			
		||||
;;; doom-tomorrow-night-r-theme.el ends here
 | 
			
		||||
@@ -4,6 +4,7 @@
 | 
			
		||||
	<alias>
 | 
			
		||||
		<family>monospace</family>
 | 
			
		||||
		<prefer>
 | 
			
		||||
			<family>DejaVu Sans Mono</family>
 | 
			
		||||
			<family>Noto Sans Mono</family>
 | 
			
		||||
			<family>Unifont-JP</family>
 | 
			
		||||
			<family>Unifont Upper</family>
 | 
			
		||||
@@ -12,6 +13,13 @@
 | 
			
		||||
			<family>Liberation Mono</family>
 | 
			
		||||
			<family>FontAwesome</family>
 | 
			
		||||
			<family>Braille</family>
 | 
			
		||||
			<family>Symbols Nerd Font Mono</family>
 | 
			
		||||
		</prefer>
 | 
			
		||||
	</alias>
 | 
			
		||||
	<alias>
 | 
			
		||||
		<family>sans-serif</family>
 | 
			
		||||
		<prefer>
 | 
			
		||||
			<family>Symbols Nerd Font</family>
 | 
			
		||||
		</prefer>
 | 
			
		||||
	</alias>
 | 
			
		||||
</fontconfig>
 | 
			
		||||
 
 | 
			
		||||
@@ -3,30 +3,61 @@
 | 
			
		||||
font=monospace:size=10
 | 
			
		||||
dpi-aware=no
 | 
			
		||||
pad= 8x8
 | 
			
		||||
pad= 16x16
 | 
			
		||||
[url]
 | 
			
		||||
launch=xdg-open ${url}
 | 
			
		||||
 | 
			
		||||
# Catpuccin (with grey background)
 | 
			
		||||
[cursor]
 | 
			
		||||
color=1A1826 D9E0EE
 | 
			
		||||
# Tomorrow Night (grey background)
 | 
			
		||||
#
 | 
			
		||||
#[cursor]
 | 
			
		||||
#color=c5c8c6
 | 
			
		||||
 | 
			
		||||
[colors]
 | 
			
		||||
alpha=0.85
 | 
			
		||||
foreground=ffffff
 | 
			
		||||
background=222222
 | 
			
		||||
regular0=6E6C7E  # black
 | 
			
		||||
regular1=F28FAD  # red
 | 
			
		||||
regular2=ABE9B3  # green
 | 
			
		||||
regular3=FAE3B0  # yellow
 | 
			
		||||
regular4=96CDFB  # blue
 | 
			
		||||
regular5=F5C2E7  # magenta
 | 
			
		||||
regular6=89DCEB  # cyan
 | 
			
		||||
regular7=D9E0EE  # white
 | 
			
		||||
bright0=988BA2   # bright black
 | 
			
		||||
bright1=F28FAD   # bright red
 | 
			
		||||
bright2=ABE9B3   # bright green
 | 
			
		||||
bright3=FAE3B0   # bright yellow
 | 
			
		||||
bright4=96CDFB   # bright blue
 | 
			
		||||
bright5=F5C2E7   # bright magenta
 | 
			
		||||
bright6=89DCEB   # bright cyan
 | 
			
		||||
bright7=D9E0EE   # bright white
 | 
			
		||||
alpha=0.80
 | 
			
		||||
#background=1d1f21
 | 
			
		||||
background=161616
 | 
			
		||||
foreground=c5c8c6
 | 
			
		||||
 | 
			
		||||
regular0=1d1f21
 | 
			
		||||
regular1=cc6666
 | 
			
		||||
regular2=b5bd68
 | 
			
		||||
regular3=f0c674
 | 
			
		||||
regular4=81a2be
 | 
			
		||||
regular5=b294bb
 | 
			
		||||
regular6=8abeb7
 | 
			
		||||
regular7=c5c8c6
 | 
			
		||||
bright0=969896
 | 
			
		||||
bright1=cc6666
 | 
			
		||||
bright2=b5bd68
 | 
			
		||||
bright3=f0c674
 | 
			
		||||
bright4=81a2be
 | 
			
		||||
bright5=b294bb
 | 
			
		||||
bright6=8abeb7
 | 
			
		||||
bright7=ffffff
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# Catpuccin (with grey background)
 | 
			
		||||
#[cursor]
 | 
			
		||||
#color=1A1826 D9E0EE
 | 
			
		||||
 | 
			
		||||
#[colors]
 | 
			
		||||
##alpha=0.85
 | 
			
		||||
#foreground=ffffff
 | 
			
		||||
##background=000000
 | 
			
		||||
#background=222222
 | 
			
		||||
#regular0=6E6C7E  # black
 | 
			
		||||
#regular1=F28FAD  # red
 | 
			
		||||
#regular2=ABE9B3  # green
 | 
			
		||||
#regular3=FAE3B0  # yellow
 | 
			
		||||
#regular4=96CDFB  # blue
 | 
			
		||||
#regular5=F5C2E7  # magenta
 | 
			
		||||
#regular6=89DCEB  # cyan
 | 
			
		||||
#regular7=D9E0EE  # white
 | 
			
		||||
#bright0=988BA2   # bright black
 | 
			
		||||
#bright1=F28FAD   # bright red
 | 
			
		||||
#bright2=ABE9B3   # bright green
 | 
			
		||||
#bright3=FAE3B0   # bright yellow
 | 
			
		||||
#bright4=96CDFB   # bright blue
 | 
			
		||||
#bright5=F5C2E7   # bright magenta
 | 
			
		||||
#bright6=89DCEB   # bright cyan
 | 
			
		||||
#bright7=D9E0EE   # bright white
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
profile {
 | 
			
		||||
	output HDMI-A-1 scale 1 mode 1366x768 position 1280,0
 | 
			
		||||
	output DVI-D-1 scale 1 mode 1280x1024 position 0,0
 | 
			
		||||
	output HDMI-A-1 scale 1 mode 1366x768 position 0,0
 | 
			
		||||
	output DVI-D-1 scale 1 mode 1280x1024 position 1366,0
 | 
			
		||||
}
 | 
			
		||||
profile {
 | 
			
		||||
	output HDMI-A-1 scale 1 mode 1366x768
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										7
									
								
								home/default/.config/kanshi/config-single
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								home/default/.config/kanshi/config-single
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,7 @@
 | 
			
		||||
profile {
 | 
			
		||||
	output HDMI-A-1 scale 1 mode 1366x768 position 0,0
 | 
			
		||||
	output DVI-D-1 disable
 | 
			
		||||
}
 | 
			
		||||
profile {
 | 
			
		||||
	output HDMI-A-1 scale 1 mode 1366x768
 | 
			
		||||
}
 | 
			
		||||
@@ -22,7 +22,7 @@ cmd open ${{
 | 
			
		||||
    case $(file --mime-type "$(readlink -f $f)" -b) in
 | 
			
		||||
	application/vnd.openxmlformats-officedocument.spreadsheetml.sheet) localc $fx ;;
 | 
			
		||||
	image/vnd.djvu|application/pdf|application/octet-stream|application/postscript) setsid -f zathura $fx >/dev/null 2>&1 ;;
 | 
			
		||||
        text/*|application/json|inode/x-empty) $EDITOR $fx;;
 | 
			
		||||
        text/*|application/json|inode/x-empty) em $fx;;
 | 
			
		||||
	image/x-xcf) setsid -f gimp $f >/dev/null 2>&1 ;;
 | 
			
		||||
	image/svg+xml) display -- $f ;;
 | 
			
		||||
	image/*) rotdir $f | grep -i "\.\(png\|jpg\|jpeg\|gif\|webp\|tif\|ico\)\(_large\)*$" |
 | 
			
		||||
@@ -129,6 +129,3 @@ map W $setsid -f $TERMINAL >/dev/null 2>&1
 | 
			
		||||
map Y $wl-copy < "$fx"
 | 
			
		||||
 | 
			
		||||
map <c-f> $setsid -f thunar . ; kill @#
 | 
			
		||||
 | 
			
		||||
# Source Bookmarks
 | 
			
		||||
source "~/.config/lf/shortcutrc"
 | 
			
		||||
 
 | 
			
		||||
@@ -1,31 +0,0 @@
 | 
			
		||||
map Ccac cd "/home/default/.cache" 
 | 
			
		||||
map Ccf cd "/home/default/.config" 
 | 
			
		||||
map CD cd "/home/default/Downloads" 
 | 
			
		||||
map Cd cd "/home/default/Documents" 
 | 
			
		||||
map Cdt cd "/home/default/.local/share" 
 | 
			
		||||
map Crr cd "/home/default/.local/src" 
 | 
			
		||||
map Ch cd "/home/default" 
 | 
			
		||||
map Cm cd "/home/default/Music" 
 | 
			
		||||
map Cmn cd "/mnt" 
 | 
			
		||||
map Cpp cd "/home/default/Pictures" 
 | 
			
		||||
map Csc cd "/home/default/.local/bin" 
 | 
			
		||||
map Csrc cd "/home/default/.local/src" 
 | 
			
		||||
map Cvv cd "/home/default/Videos" 
 | 
			
		||||
map Ebf $$EDITOR "/home/default/.config/shell/bm-files" 
 | 
			
		||||
map Ebd $$EDITOR "/home/default/.config/shell/bm-dirs" 
 | 
			
		||||
map Ecfx $$EDITOR "/home/default/.config/x11/xresources" 
 | 
			
		||||
map Ecfs $$EDITOR "/home/default/.config/sway/config" 
 | 
			
		||||
map Ecfb $$EDITOR "/home/default/.config/waybar/config" 
 | 
			
		||||
map EcfB $$EDITOR "/home/default/.config/waybar/style.css" 
 | 
			
		||||
map Ecfv $$EDITOR "/home/default/.config/nvim/init.vim" 
 | 
			
		||||
map Ecfz $$EDITOR "/home/default/.config/zsh/.zshrc" 
 | 
			
		||||
map Ecfa $$EDITOR "/home/default/.config/shell/aliasrc" 
 | 
			
		||||
map Ecfp $$EDITOR "/home/default/.config/shell/profile" 
 | 
			
		||||
map Ecfm $$EDITOR "/home/default/.config/mutt/muttrc" 
 | 
			
		||||
map Ecfn $$EDITOR "/home/default/.config/newsboat/config" 
 | 
			
		||||
map Ecfu $$EDITOR "/home/default/.config/newsboat/urls" 
 | 
			
		||||
map Ecfmb $$EDITOR "/home/default/.config/ncmpcpp/bindings" 
 | 
			
		||||
map Ecfmc $$EDITOR "/home/default/.config/ncmpcpp/config" 
 | 
			
		||||
map Ecfl $$EDITOR "/home/default/.config/lf/lfrc" 
 | 
			
		||||
map EcfL $$EDITOR "/home/default/.config/lf/scope" 
 | 
			
		||||
map EcfX $$EDITOR "/home/default/.config/nsxiv/exec/key-handler" 
 | 
			
		||||
@@ -1,21 +1,26 @@
 | 
			
		||||
 | 
			
		||||
[Default Applications]
 | 
			
		||||
 | 
			
		||||
# xdg-open will use these settings to determine how to open filetypes.
 | 
			
		||||
# These .desktop entries can also be seen and changed in ~/.local/share/applications/
 | 
			
		||||
 | 
			
		||||
text/x-shellscript=text.desktop;
 | 
			
		||||
x-scheme-handler/magnet=torrent.desktop;
 | 
			
		||||
application/x-bittorrent=torrent.desktop;
 | 
			
		||||
x-scheme-handler/mailto=mail.desktop;
 | 
			
		||||
text/plain=text.desktop;
 | 
			
		||||
application/postscript=pdf.desktop;
 | 
			
		||||
application/pdf=pdf.desktop;
 | 
			
		||||
application/vnd.comicbook+zip=pdf.desktop;
 | 
			
		||||
application/vnd.comicbook-rar=pdf.desktop;
 | 
			
		||||
image/png=img.desktop;
 | 
			
		||||
image/jpeg=img.desktop;
 | 
			
		||||
image/gif=img.desktop;
 | 
			
		||||
image/jpeg=img.desktop
 | 
			
		||||
image/png=img.desktop
 | 
			
		||||
image/x-png=img.desktop
 | 
			
		||||
image/gif=img.desktop
 | 
			
		||||
text/x-shellscript=text.desktop
 | 
			
		||||
x-scheme-handler/magnet=torrent.desktop
 | 
			
		||||
application/x-bittorrent=torrent.desktop
 | 
			
		||||
x-scheme-handler/mailto=mail.desktop
 | 
			
		||||
text/plain=text.desktop
 | 
			
		||||
application/postscript=pdf.desktop
 | 
			
		||||
application/pdf=pdf.desktop
 | 
			
		||||
application/vnd.comicbook+zip=pdf.desktop
 | 
			
		||||
application/vnd.comicbook-rar=pdf.desktop
 | 
			
		||||
image/png=img.desktop
 | 
			
		||||
image/x-png=img.desktop
 | 
			
		||||
image/jpg=img.desktop
 | 
			
		||||
image/jpeg=img.desktop
 | 
			
		||||
image/gif=img.desktop
 | 
			
		||||
application/rss+xml=rss.desktop
 | 
			
		||||
video/x-matroska=video.desktop
 | 
			
		||||
video/mp4=video.desktop
 | 
			
		||||
@@ -23,5 +28,5 @@ x-scheme-handler/lbry=lbry.desktop
 | 
			
		||||
inode/directory=file.desktop
 | 
			
		||||
 | 
			
		||||
# other
 | 
			
		||||
x-scheme-handler/https=librewolf.desktop;
 | 
			
		||||
x-scheme-handler/http=librewolf.desktop;
 | 
			
		||||
x-scheme-handler/https=io.gitlab.librewolf-community.desktop
 | 
			
		||||
x-scheme-handler/http=io.gitlab.librewolf-community.desktop
 | 
			
		||||
 
 | 
			
		||||
@@ -1,33 +1,12 @@
 | 
			
		||||
#!/bin/sh
 | 
			
		||||
# todo: import to wayland
 | 
			
		||||
while read -r file
 | 
			
		||||
do
 | 
			
		||||
        case "$1" in
 | 
			
		||||
        "w") change-background "$file" & ;;
 | 
			
		||||
        "c")
 | 
			
		||||
		[ -z "$destdir" ] && destdir="$(sed "s/#.*$//;/^\s*$/d" ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | awk '{print $2}' | rofi -dmenu -l 20 -i -p "Copy file(s) to where?" | sed "s|~|$HOME|g")"
 | 
			
		||||
		[ ! -d "$destdir" ] && notify-send "$destdir is not a directory, cancelled." && exit
 | 
			
		||||
		cp "$file" "$destdir" && notify-send -i "$(readlink -f "$file")" "$file copied to $destdir." &
 | 
			
		||||
		;;
 | 
			
		||||
        "m")
 | 
			
		||||
		[ -z "$destdir" ] && destdir="$(sed "s/#.*$//;/^\s*$/d" ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | awk '{print $2}' | rofi -dmenu -l 20 -i -p "Move file(s) to where?" | sed "s|~|$HOME|g")"
 | 
			
		||||
		[ ! -d "$destdir" ] && notify-send "$destdir is not a directory, cancelled." && exit
 | 
			
		||||
		mv "$file" "$destdir" && notify-send -i "$(readlink -f "$file")" "$file moved to $destdir." &
 | 
			
		||||
		;;
 | 
			
		||||
	"r")
 | 
			
		||||
		convert -rotate 90 "$file" "$file" ;;
 | 
			
		||||
	"R")
 | 
			
		||||
		convert -rotate -90 "$file" "$file" ;;
 | 
			
		||||
	"f")
 | 
			
		||||
		convert -flop "$file" "$file" ;;
 | 
			
		||||
        "b") change-background "$file" & ;;
 | 
			
		||||
	"y")    wl-copy < $file ;;
 | 
			
		||||
		#printf "%s" "$file" | tr -d '\n' | xclip -selection clipboard &&
 | 
			
		||||
		#notify-send "$file copied to clipboard" & ;;
 | 
			
		||||
	"Y")
 | 
			
		||||
		readlink -f "$file" | tr -d '\n' | xclip -selection clipboard &&
 | 
			
		||||
			notify-send "$(readlink -f "$file") copied to clipboard" & ;;
 | 
			
		||||
	"d")
 | 
			
		||||
		[ "$(printf "No\\nYes" | rofi -dmenu -i -p "Really delete $file?")" = "Yes" ] && rm "$file" && notify-send "$file deleted." ;;
 | 
			
		||||
		#[ "$(printf "No\\nYes" | rofi -dmenu -i -p "Really delete $file?")" = "Yes" ] && rm "$file" && notify-send "$file deleted." ;;
 | 
			
		||||
		[ "$(printf "No\\nYes" | wofi --insensitive --show dmenu  --prompt="Really delete $file?")" = "Yes" ] && rm "$file" && notify-send "$file deleted." ;;
 | 
			
		||||
	"g")	setsid -f gimp "$file" ;;
 | 
			
		||||
	"i")	notify-send "File information" "$(mediainfo "$file" | sed "s/[ ]\+:/:/g;s/: /: <b>/;s/$/<\/b>/" | grep "<b>")" ;;
 | 
			
		||||
        esac
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										108
									
								
								home/default/.config/nvim/init.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										108
									
								
								home/default/.config/nvim/init.lua
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,108 @@
 | 
			
		||||
vim.opt.clipboard="unnamed,unnamedplus"
 | 
			
		||||
vim.g.mapleader = ' '
 | 
			
		||||
 | 
			
		||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
 | 
			
		||||
if not vim.loop.fs_stat(lazypath) then
 | 
			
		||||
  vim.fn.system({
 | 
			
		||||
    "git",
 | 
			
		||||
    "clone",
 | 
			
		||||
    "--filter=blob:none",
 | 
			
		||||
    "https://github.com/folke/lazy.nvim.git",
 | 
			
		||||
    "--branch=stable", -- latest stable release
 | 
			
		||||
    lazypath,
 | 
			
		||||
  })
 | 
			
		||||
end
 | 
			
		||||
vim.opt.rtp:prepend(lazypath)
 | 
			
		||||
require("lazy").setup({
 | 
			
		||||
  "nyoom-engineering/oxocarbon.nvim",
 | 
			
		||||
  {"nvim-treesitter/nvim-treesitter", build = ":TSUpdate"},
 | 
			
		||||
  {
 | 
			
		||||
    'nvim-orgmode/orgmode',
 | 
			
		||||
    dependencies = {
 | 
			
		||||
      { 'nvim-treesitter/nvim-treesitter', lazy = true },
 | 
			
		||||
    },
 | 
			
		||||
    event = 'VeryLazy',
 | 
			
		||||
    config = function()
 | 
			
		||||
      -- Load treesitter grammar for org
 | 
			
		||||
      require('orgmode').setup_ts_grammar()
 | 
			
		||||
 | 
			
		||||
      -- Setup treesitter
 | 
			
		||||
      require('nvim-treesitter.configs').setup({
 | 
			
		||||
        highlight = {
 | 
			
		||||
          enable = false,
 | 
			
		||||
          additional_vim_regex_highlighting = { 'org' },
 | 
			
		||||
        },
 | 
			
		||||
        ensure_installed = { 'org' },
 | 
			
		||||
      })
 | 
			
		||||
 | 
			
		||||
      -- Setup orgmode -- NOTE (to self) THAT I ONLY USE THIS FOR CAPTURING CODE 
 | 
			
		||||
      --                  AND CHANGING Todo STATES in todo.org FOR CODING
 | 
			
		||||
      --                  for simplicity's sake
 | 
			
		||||
      require('orgmode').setup({
 | 
			
		||||
        --org_agenda_files = '~/orgfiles/**/*',
 | 
			
		||||
        org_agenda_files = '~/notebook/ag/*',
 | 
			
		||||
        org_default_notes_file = '~/notebook/ag/todo.org',
 | 
			
		||||
	org_log_done = 'time',
 | 
			
		||||
	org_log_into_drawer = 'LOGBOOK',
 | 
			
		||||
	--org_todo_keywords = {'TODO(t)', 'NEXT(n)', '|', 'DONE(d)'},
 | 
			
		||||
	org_todo_keywords = {"TODO(t)", "PROJ(p)", "LOOP(r)", "STRT(s)", "WAIT(w)", "HOLD(h)", "IDEA(i)", "|", "DONE(d)", "KILL(k)"},
 | 
			
		||||
	org_capture_templates = {
 | 
			
		||||
	  t = {
 | 
			
		||||
	  description = 'todo with link',
 | 
			
		||||
	  template = '* TODO %?\n%i\n%a',
 | 
			
		||||
	  target = '~/notebook/ag/todo.org',
 | 
			
		||||
	  headline = 'todo',
 | 
			
		||||
	  },
 | 
			
		||||
	  T = {
 | 
			
		||||
	  description = 'todo no link',
 | 
			
		||||
	  template = '* TODO %?\n%i\n%a',
 | 
			
		||||
	  target = '~/notebook/ag/todo.org',
 | 
			
		||||
	  headline = 'todo',
 | 
			
		||||
	  },
 | 
			
		||||
	},
 | 
			
		||||
	mappings = { -- make as close to doom
 | 
			
		||||
	  --disable_all = true,
 | 
			
		||||
	  global = {
 | 
			
		||||
	    org_agenda = {'<Leader>oa'},
 | 
			
		||||
	    org_capture = '<Leader>x',
 | 
			
		||||
	  },
 | 
			
		||||
	  agenda = {
 | 
			
		||||
	    org_agenda_todo = '<Leader>mt',
 | 
			
		||||
	    org_agenda_schedule = '<Leader>mds',
 | 
			
		||||
	    org_agenda_deadline = '<Leader>mdd',
 | 
			
		||||
	    org_agenda_ = '<Leader>mds',
 | 
			
		||||
 | 
			
		||||
	  },
 | 
			
		||||
	  org = {
 | 
			
		||||
	    org_todo = '<Leader>mt',
 | 
			
		||||
	    org_priority = '<Leader>mpp',
 | 
			
		||||
	    --org_move_subtree_up = '<ALT-k>',
 | 
			
		||||
	    --org_move_subtree_down = '<ALT-j>',
 | 
			
		||||
	    org_schedule = '<Leader>mds',
 | 
			
		||||
	    org_deadline = '<Leader>mdd',
 | 
			
		||||
	    org_time_stamp = '<Leader>mdt',
 | 
			
		||||
	    org_time_stamp_inactive = '<Leader>mdT',
 | 
			
		||||
	  },
 | 
			
		||||
	},
 | 
			
		||||
      })
 | 
			
		||||
    end,
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
  'nvim-telescope/telescope.nvim', tag = '0.1.5',
 | 
			
		||||
-- or                              , branch = '0.1.x',
 | 
			
		||||
    dependencies = { 'nvim-lua/plenary.nvim' }
 | 
			
		||||
  },
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
--vim.opt.background = "dark" -- set this to dark or light
 | 
			
		||||
--vim.cmd("colorscheme oxocarbon")
 | 
			
		||||
 | 
			
		||||
--keybinds
 | 
			
		||||
vim.keymap.set("n", "<leader>.", vim.cmd.Ex)
 | 
			
		||||
vim.keymap.set("n", "<leader>ff", vim.cmd.Ex)
 | 
			
		||||
local builtin = require('telescope.builtin')
 | 
			
		||||
vim.keymap.set('n', '<leader><leader>', builtin.find_files, {})
 | 
			
		||||
--vim.keymap.set('n', '<leader>fg', builtin.live_grep, {})
 | 
			
		||||
--vim.keymap.set('n', '<leader>fb', builtin.buffers, {})
 | 
			
		||||
--vim.keymap.set('n', '<leader>fh', builtin.help_tags, {})
 | 
			
		||||
@@ -1,2 +0,0 @@
 | 
			
		||||
let mapleader =","
 | 
			
		||||
set clipboard+=unnamedplus
 | 
			
		||||
@@ -23,8 +23,7 @@ alias \
 | 
			
		||||
	mkd="mkdir -pv" \
 | 
			
		||||
	ffmpeg="ffmpeg -hide_banner"
 | 
			
		||||
	wedit(){
 | 
			
		||||
which $@ >/dev/null 2>&1 && [ -n "$1" ] && vim $(which $@) && exit 0
 | 
			
		||||
printf "file doesn't exist.\n"
 | 
			
		||||
which $@ >/dev/null 2>&1 && [ -n "$1" ] && vim $(which $@) || printf "file doesn't exist.\n"
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
# Colorize commands when possible.
 | 
			
		||||
@@ -52,7 +51,7 @@ alias \
 | 
			
		||||
 | 
			
		||||
# misc
 | 
			
		||||
alias \
 | 
			
		||||
	ytmus="yt-dlp --embed-metadata --embed-thumbnail -xc -f bestaudio/best --restrict-filenames" \
 | 
			
		||||
	ytmus="yt-dlp --embed-metadata --embed-thumbnail -xc -f 'bestaudio[ext=m4a]'" \
 | 
			
		||||
	ytvid="yt-dlp --embed-metadata --embed-thumbnail --embed-chapters --write-auto-subs -f bestvideo'[height<=1080]''[ext=mp4]'+bestaudio'[ext=m4a]'/best'[ext=mp4]'/best" \
 | 
			
		||||
	t="todo.sh -t -d $HOME/notebook/todo/todo.cfg" \
 | 
			
		||||
	fj="firejail --profile=$HOME/.config/firejail/game.profile" \
 | 
			
		||||
@@ -60,8 +59,8 @@ alias \
 | 
			
		||||
	hgs="hugo server --noHTTPCache --disableFastRender"
 | 
			
		||||
 | 
			
		||||
# ytfzf
 | 
			
		||||
alias \
 | 
			
		||||
	ytfzf="ytfzf --thumb-viewer=imv" \
 | 
			
		||||
	ytfzf-video="ytfzf --detach -t" \
 | 
			
		||||
	ytfzf-audio="ytfzf -m" \
 | 
			
		||||
	ytfzf-history="ytfzf --detach -H"
 | 
			
		||||
#alias \
 | 
			
		||||
#	ytfzf="ytfzf --thumb-viewer=imv" \
 | 
			
		||||
#	ytfzf-video="ytfzf --detach -t" \
 | 
			
		||||
#	ytfzf-audio="ytfzf -m" \
 | 
			
		||||
#	ytfzf-history="ytfzf --detach -H"
 | 
			
		||||
 
 | 
			
		||||
@@ -1,14 +0,0 @@
 | 
			
		||||
# You can add comments to these files with #
 | 
			
		||||
cac ${XDG_CACHE_HOME:-$HOME/.cache}
 | 
			
		||||
cf  ${XDG_CONFIG_HOME:-$HOME/.config}
 | 
			
		||||
D   ${XDG_DOWNLOAD_DIR:-$HOME/Downloads}
 | 
			
		||||
d   ${XDG_DOCUMENTS_DIR:-$HOME/Documents}
 | 
			
		||||
dt  ${XDG_DATA_HOME:-$HOME/.local/share}
 | 
			
		||||
rr  $HOME/.local/src
 | 
			
		||||
h   $HOME
 | 
			
		||||
m   ${XDG_MUSIC_DIR:-$HOME/Music}
 | 
			
		||||
mn  /mnt
 | 
			
		||||
pp  ${XDG_PICTURES_DIR:-$HOME/Pictures}
 | 
			
		||||
sc  $HOME/.local/bin
 | 
			
		||||
src $HOME/.local/src
 | 
			
		||||
vv  ${XDG_VIDEOS_DIR:-$HOME/Videos}
 | 
			
		||||
@@ -1,20 +0,0 @@
 | 
			
		||||
# keys	filename				description
 | 
			
		||||
bf	${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-files	# This file, a list of bookmarked files
 | 
			
		||||
bd	${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs		# A list of bookmarked directories similar to this file
 | 
			
		||||
cfx	${XDG_CONFIG_HOME:-$HOME/.config}/x11/xresources	# Colors, themes and variables for X11
 | 
			
		||||
cfs ${XDG_CONFIG_HOME:-$HOME/.config}/sway/config
 | 
			
		||||
cfb ${XDG_CONFIG_HOME:-$HOME/.config}/waybar/config
 | 
			
		||||
cfB ${XDG_CONFIG_HOME:-$HOME/.config}/waybar/style.css
 | 
			
		||||
 | 
			
		||||
cfv	${XDG_CONFIG_HOME:-$HOME/.config}/nvim/init.vim		# vim/neovim config
 | 
			
		||||
cfz	$ZDOTDIR/.zshrc						# zsh (shell) config
 | 
			
		||||
cfa	${XDG_CONFIG_HOME:-$HOME/.config}/shell/aliasrc		# aliases used by zsh (and potentially other shells)
 | 
			
		||||
cfp	${XDG_CONFIG_HOME:-$HOME/.config}/shell/profile		# profile file for login settings for zsh
 | 
			
		||||
cfm	${XDG_CONFIG_HOME:-$HOME/.config}/mutt/muttrc		# mutt (email client) config
 | 
			
		||||
cfn	${XDG_CONFIG_HOME:-$HOME/.config}/newsboat/config	# newsboat (RSS reader)
 | 
			
		||||
cfu	${XDG_CONFIG_HOME:-$HOME/.config}/newsboat/urls		# RSS urls for newsboat
 | 
			
		||||
cfmb	${XDG_CONFIG_HOME:-$HOME/.config}/ncmpcpp/bindings	# ncmpcpp (music player) keybinds file
 | 
			
		||||
cfmc	${XDG_CONFIG_HOME:-$HOME/.config}/ncmpcpp/config	# ncmpcpp (music player) config
 | 
			
		||||
cfl	${XDG_CONFIG_HOME:-$HOME/.config}/lf/lfrc		# lf (file browser) config
 | 
			
		||||
cfL	${XDG_CONFIG_HOME:-$HOME/.config}/lf/scope		# lf's scope/preview file
 | 
			
		||||
cfX	${XDG_CONFIG_HOME:-$HOME/.config}/nsxiv/exec/key-handler	# sxiv (image viewer) key/script handler
 | 
			
		||||
@@ -16,7 +16,7 @@ unsetopt PROMPT_SP
 | 
			
		||||
# Default programs:
 | 
			
		||||
export EDITOR="nvim"
 | 
			
		||||
export TERMINAL="foot"
 | 
			
		||||
export BROWSER="librewolf"
 | 
			
		||||
export BROWSER="io.gitlab.librewolf-community"
 | 
			
		||||
 | 
			
		||||
# ~/ Clean-up:
 | 
			
		||||
export XDG_CONFIG_HOME="$HOME/.config"
 | 
			
		||||
@@ -69,7 +69,7 @@ export XMODIFIERS=@im=fcitx
 | 
			
		||||
export SDL_IM_MODULE=fcitx
 | 
			
		||||
export GLFW_IM_MODULE=ibus
 | 
			
		||||
#export QT_STYLE_OVERRIDE=adwaita-dark
 | 
			
		||||
 | 
			
		||||
export GTK_THEME=Materia:dark
 | 
			
		||||
 | 
			
		||||
#wayland
 | 
			
		||||
#export QT_QPA_PLATFORM=wayland
 | 
			
		||||
@@ -77,6 +77,7 @@ export GLFW_IM_MODULE=ibus
 | 
			
		||||
#export XDG_SESSION_DESKTOP=river
 | 
			
		||||
#export XDG_CURRENT_SESSION_TYPE=wayland
 | 
			
		||||
#export GDK_BACKEND="wayland,x11"
 | 
			
		||||
export GDK_BACKEND="wayland"
 | 
			
		||||
export MOZ_ENABLE_WAYLAND=1
 | 
			
		||||
#export WLR_RENDERER=vulkan
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
### sway settings
 | 
			
		||||
### sway(fx) settings
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# logo key. Use Mod1 for Alt.
 | 
			
		||||
@@ -13,8 +13,8 @@ set $right l
 | 
			
		||||
set $term $TERMINAL
 | 
			
		||||
set $browser $BROWSER
 | 
			
		||||
set $editor $EDITOR
 | 
			
		||||
#set $menu dmenu_path | dmenu | xargs swaymsg exec --
 | 
			
		||||
set $menu rofi -show combi | xargs swaymsg exec --
 | 
			
		||||
set $menu wofi -i --show drun | xargs swaymsg exec --
 | 
			
		||||
set $dmenu wofi -i --show run | xargs swaymsg exec --
 | 
			
		||||
 | 
			
		||||
# wallpaper
 | 
			
		||||
exec change-background
 | 
			
		||||
@@ -30,7 +30,7 @@ exec swaync
 | 
			
		||||
exec --no-startup-id kanshi
 | 
			
		||||
 | 
			
		||||
# input method
 | 
			
		||||
exec fcitx5
 | 
			
		||||
#exec fcitx5
 | 
			
		||||
 | 
			
		||||
# night light
 | 
			
		||||
#exec sleep 3 && gammastep -l LAT:LON
 | 
			
		||||
@@ -47,8 +47,12 @@ exec syncthing --no-browser
 | 
			
		||||
# polkit
 | 
			
		||||
exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
 | 
			
		||||
 | 
			
		||||
# emacs daemon
 | 
			
		||||
exec /usr/bin/emacs --daemon
 | 
			
		||||
# emacs daemon (locally built)
 | 
			
		||||
exec /usr/local/bin/emacs --daemon
 | 
			
		||||
exec swaymsg "workspace 1; exec sleep 10 && emacsclient -c;"
 | 
			
		||||
 | 
			
		||||
# sworkstyle
 | 
			
		||||
#exec sworkstyle &> /tmp/sworkstyle.log
 | 
			
		||||
 | 
			
		||||
#assign [app_id="librewolf"] 2
 | 
			
		||||
#assign [app_id="firefox"] 2
 | 
			
		||||
@@ -69,9 +73,16 @@ show_marks yes
 | 
			
		||||
 | 
			
		||||
# looks
 | 
			
		||||
font pango: monospace 8
 | 
			
		||||
gaps inner 25
 | 
			
		||||
gaps inner 10
 | 
			
		||||
default_border pixel 2
 | 
			
		||||
bindsym $mod+Control+y border toggle
 | 
			
		||||
# swayfx specific
 | 
			
		||||
blur enable
 | 
			
		||||
blur_xray enable
 | 
			
		||||
blur_passes 2
 | 
			
		||||
blur_radius 3
 | 
			
		||||
#corner_radius 20
 | 
			
		||||
shadows enable
 | 
			
		||||
 | 
			
		||||
set $cl_high #333333
 | 
			
		||||
set $cl_indi #333333
 | 
			
		||||
@@ -108,7 +119,7 @@ bindsym $mod+q kill
 | 
			
		||||
 | 
			
		||||
# start your launcher
 | 
			
		||||
bindsym $mod+d exec $menu
 | 
			
		||||
bindsym $mod+Shift+d exec dmenu_path | dmenu | xargs swaymsg exec
 | 
			
		||||
bindsym $mod+Shift+d exec $dmenu
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# drag floating windows by holding down $mod and left mouse button.
 | 
			
		||||
@@ -151,26 +162,18 @@ bindsym $mod+Control+u exec screenshot.sh output
 | 
			
		||||
bindsym $mod+u exec screenshot.sh active
 | 
			
		||||
bindsym $mod+Shift+u exec screenshot.sh window
 | 
			
		||||
 | 
			
		||||
# app switcher
 | 
			
		||||
bindsym $mod+Tab exec sway-select-window
 | 
			
		||||
bindsym $mod+Shift+Tab exec ss.sh
 | 
			
		||||
 | 
			
		||||
### programs
 | 
			
		||||
 | 
			
		||||
# files
 | 
			
		||||
bindsym $mod+F1 exec em ~/.config/sway/config
 | 
			
		||||
bindsym $mod+F2 exec em ~/.dotroot/packages.txt
 | 
			
		||||
bindsym $mod+F3 exec em ~/.dotroot/instructions.org
 | 
			
		||||
bindsym $mod+F4 exec em ~/notebook/studies/college.org
 | 
			
		||||
bindsym $mod+F5 exec em ~/notebook/ag/habits.org
 | 
			
		||||
bindsym $mod+F6 exec em ~/notebook/ag/todo.org
 | 
			
		||||
 | 
			
		||||
# browser
 | 
			
		||||
bindsym $mod+w exec $browser
 | 
			
		||||
 | 
			
		||||
# agenda
 | 
			
		||||
bindsym $mod+c exec emacsclient --eval '(org-agenda-list)' || emacs --eval '(org-agenda-list)'
 | 
			
		||||
 | 
			
		||||
# notebook
 | 
			
		||||
bindsym $mod+n exec $term -e $editor ~/notebook/index.org
 | 
			
		||||
bindsym $mod+v exec em ~/notebook/refile.org
 | 
			
		||||
bindsym $mod+c exec emacsclient -c --eval '(org-agenda-list)' || emacs -c --eval '(org-agenda-list)'
 | 
			
		||||
bindsym $mod+Shift+c exec ~/.emacs.d/bin/org-capture
 | 
			
		||||
 | 
			
		||||
# newsboat (rss)
 | 
			
		||||
bindsym $mod+Shift+n exec $term -e newsboat
 | 
			
		||||
@@ -185,31 +188,27 @@ bindsym $mod+r exec $term -e lf
 | 
			
		||||
bindsym $mod+e exec emacsclient -c || emacs
 | 
			
		||||
 | 
			
		||||
# mail
 | 
			
		||||
#bindsym $mod+e exec $term -e neomutt
 | 
			
		||||
 | 
			
		||||
# start tasks in dmenu
 | 
			
		||||
bindsym $mod+Control+d exec start-tasks
 | 
			
		||||
bindsym $mod+Shift+x exec start-tasks
 | 
			
		||||
#bindsym $mod+e exec thunderbird-wayland
 | 
			
		||||
 | 
			
		||||
# bookmarks
 | 
			
		||||
bindsym $mod+b exec em ~/notebook/bookmarks.org
 | 
			
		||||
bindsym $mod+b exec emacsclient -c ~/notebook/bookmarks.org || emacs -c ~/notebook/bookmarks.org
 | 
			
		||||
bindsym $mod+shift+b exec bookmark
 | 
			
		||||
bindsym $mod+Insert exec wtype "$(grep -v '^#' ~/notebook/bookmarks.org | dmenu -l 50 | cut -d' ' -f1)"
 | 
			
		||||
 | 
			
		||||
# kaomiji?
 | 
			
		||||
bindsym $mod+z exec dmenukaomoji
 | 
			
		||||
# bindsym $mod+z exec dmenukaomoji
 | 
			
		||||
 | 
			
		||||
# keepass dmenu
 | 
			
		||||
bindsym $mod+shift+Insert exec keepmenu
 | 
			
		||||
 bindsym $mod+shift+Insert exec keepmenu
 | 
			
		||||
 | 
			
		||||
# download script
 | 
			
		||||
bindsym $mod+Control+m exec musdl
 | 
			
		||||
 | 
			
		||||
# youtube client
 | 
			
		||||
# open youtube link in ft
 | 
			
		||||
bindsym $mod+y exec io.freetubeapp.FreeTube $(wl-paste)
 | 
			
		||||
 | 
			
		||||
# games
 | 
			
		||||
bindsym $mod+g exec taverner
 | 
			
		||||
# bindsym $mod+g exec taverner
 | 
			
		||||
 | 
			
		||||
# workspace names
 | 
			
		||||
set $wp1 1
 | 
			
		||||
@@ -225,6 +224,18 @@ set $wp10 10
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# binding workspace to monitors
 | 
			
		||||
#  main monitor on right
 | 
			
		||||
#workspace $wp1 output DVI-D-1
 | 
			
		||||
#workspace $wp2 output DVI-D-1
 | 
			
		||||
#workspace $wp3 output DVI-D-1
 | 
			
		||||
#workspace $wp4 output DVI-D-1
 | 
			
		||||
#workspace $wp5 output DVI-D-1
 | 
			
		||||
#workspace $wp6 output HDMI-A-1
 | 
			
		||||
#workspace $wp7 output HDMI-A-1
 | 
			
		||||
#workspace $wp8 output HDMI-A-1
 | 
			
		||||
#workspace $wp9 output HDMI-A-1
 | 
			
		||||
#workspace $wp10 output HDMI-A-1
 | 
			
		||||
#  main monitor on left
 | 
			
		||||
workspace $wp1 output HDMI-A-1
 | 
			
		||||
workspace $wp2 output HDMI-A-1
 | 
			
		||||
workspace $wp3 output HDMI-A-1
 | 
			
		||||
@@ -237,28 +248,28 @@ workspace $wp9 output DVI-D-1
 | 
			
		||||
workspace $wp10 output DVI-D-1
 | 
			
		||||
 | 
			
		||||
# switch to workspace
 | 
			
		||||
bindsym $mod+1 workspace $wp1
 | 
			
		||||
bindsym $mod+2 workspace $wp2
 | 
			
		||||
bindsym $mod+3 workspace $wp3
 | 
			
		||||
bindsym $mod+4 workspace $wp4
 | 
			
		||||
bindsym $mod+5 workspace $wp5
 | 
			
		||||
bindsym $mod+6 workspace $wp6
 | 
			
		||||
bindsym $mod+7 workspace $wp7
 | 
			
		||||
bindsym $mod+8 workspace $wp8
 | 
			
		||||
bindsym $mod+9 workspace $wp9
 | 
			
		||||
bindsym $mod+0 workspace $wp10
 | 
			
		||||
bindsym $mod+1 workspace number $wp1
 | 
			
		||||
bindsym $mod+2 workspace number $wp2
 | 
			
		||||
bindsym $mod+3 workspace number $wp3
 | 
			
		||||
bindsym $mod+4 workspace number $wp4
 | 
			
		||||
bindsym $mod+5 workspace number $wp5
 | 
			
		||||
bindsym $mod+6 workspace number $wp6
 | 
			
		||||
bindsym $mod+7 workspace number $wp7
 | 
			
		||||
bindsym $mod+8 workspace number $wp8
 | 
			
		||||
bindsym $mod+9 workspace number $wp9
 | 
			
		||||
bindsym $mod+0 workspace number $wp10
 | 
			
		||||
 | 
			
		||||
# move focused container to workspace
 | 
			
		||||
bindsym $mod+Shift+1 move container to workspace $wp1
 | 
			
		||||
bindsym $mod+Shift+2 move container to workspace $wp2
 | 
			
		||||
bindsym $mod+Shift+3 move container to workspace $wp3
 | 
			
		||||
bindsym $mod+Shift+4 move container to workspace $wp4
 | 
			
		||||
bindsym $mod+Shift+5 move container to workspace $wp5
 | 
			
		||||
bindsym $mod+Shift+6 move container to workspace $wp6
 | 
			
		||||
bindsym $mod+Shift+7 move container to workspace $wp7
 | 
			
		||||
bindsym $mod+Shift+8 move container to workspace $wp8
 | 
			
		||||
bindsym $mod+Shift+9 move container to workspace $wp9
 | 
			
		||||
bindsym $mod+Shift+0 move container to workspace $wp10
 | 
			
		||||
bindsym $mod+Shift+1 move container to workspace number $wp1
 | 
			
		||||
bindsym $mod+Shift+2 move container to workspace number $wp2
 | 
			
		||||
bindsym $mod+Shift+3 move container to workspace number $wp3
 | 
			
		||||
bindsym $mod+Shift+4 move container to workspace number $wp4
 | 
			
		||||
bindsym $mod+Shift+5 move container to workspace number $wp5
 | 
			
		||||
bindsym $mod+Shift+6 move container to workspace number $wp6
 | 
			
		||||
bindsym $mod+Shift+7 move container to workspace number $wp7
 | 
			
		||||
bindsym $mod+Shift+8 move container to workspace number $wp8
 | 
			
		||||
bindsym $mod+Shift+9 move container to workspace number $wp9
 | 
			
		||||
bindsym $mod+Shift+0 move container to workspace number $wp10
 | 
			
		||||
 | 
			
		||||
# move focused container to workspace
 | 
			
		||||
# with comma/period (</>)
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										108
									
								
								home/default/.config/sworkstyle/config.toml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										108
									
								
								home/default/.config/sworkstyle/config.toml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,108 @@
 | 
			
		||||
# https://www.nerdfonts.com/cheat-sheet
 | 
			
		||||
# https://fontawesome.com/icons
 | 
			
		||||
 | 
			
		||||
fallback = ''
 | 
			
		||||
separator = ' '
 | 
			
		||||
 | 
			
		||||
[matching]
 | 
			
		||||
## partials
 | 
			
		||||
'/GitHub/' = ''
 | 
			
		||||
'/GitLab/' = ''
 | 
			
		||||
'/NVIM ?\w*/' = ''
 | 
			
		||||
'/npm/' = ''
 | 
			
		||||
'/node/' = ''
 | 
			
		||||
'/yarn/' = ''
 | 
			
		||||
'/Stack Overflow/' = ''
 | 
			
		||||
"/layer02.net/" = ""
 | 
			
		||||
"/WhatsApp/" = ""
 | 
			
		||||
"/Org Agenda/" = ""
 | 
			
		||||
 | 
			
		||||
## browsers
 | 
			
		||||
'google-chrome' = ''
 | 
			
		||||
'Google-chrome' = ''
 | 
			
		||||
'Google-chrome-unstable' = ''
 | 
			
		||||
'google-chrome-unstable' = ''
 | 
			
		||||
'Google-chrome-beta' = ''
 | 
			
		||||
'google-chrome-beta' = ''
 | 
			
		||||
'chromium' = ''
 | 
			
		||||
'firefox' = ''
 | 
			
		||||
'firefoxdeveloperedition' = ''
 | 
			
		||||
'vivaldi-stable' = ''
 | 
			
		||||
'LibreWolf' = ''
 | 
			
		||||
'librewolf-default' = ''
 | 
			
		||||
 | 
			
		||||
## default applications
 | 
			
		||||
'foot' = ''
 | 
			
		||||
'/foot/' = ''
 | 
			
		||||
'floating_shell' = ''
 | 
			
		||||
'pcmanfm' = ''
 | 
			
		||||
'pamac-manager' = ''
 | 
			
		||||
'/Bluetooth/' = ''
 | 
			
		||||
'file-roller' = ''
 | 
			
		||||
'swappy' = ''
 | 
			
		||||
 | 
			
		||||
## email
 | 
			
		||||
'Thunderbird' = ''
 | 
			
		||||
'thunderbird' = ''
 | 
			
		||||
'thunderbird-beta' = ''
 | 
			
		||||
'evolution' = ''
 | 
			
		||||
 | 
			
		||||
## ide
 | 
			
		||||
'code' = ''
 | 
			
		||||
'Code' = ''
 | 
			
		||||
'/- Visual Studio Code/' = ''
 | 
			
		||||
'/IntelliJ/' = ''
 | 
			
		||||
'code-url-handler' = ''
 | 
			
		||||
'emacs' = ''
 | 
			
		||||
 | 
			
		||||
# messenger
 | 
			
		||||
'whatsapp-for-linux' = ''
 | 
			
		||||
'Slack' = ''
 | 
			
		||||
'/Telegram/' = ''
 | 
			
		||||
'org.telegram.desktop' = ''
 | 
			
		||||
'/Microsoft Teams/' = ''
 | 
			
		||||
'Signal' = ''
 | 
			
		||||
'discord' = ''
 | 
			
		||||
'im.dino.Dino' = ''
 | 
			
		||||
'dino' = ''
 | 
			
		||||
"SchildiChat" = ""
 | 
			
		||||
 | 
			
		||||
## auth
 | 
			
		||||
'polkit-gnome-authentication-agent-1' = ''
 | 
			
		||||
'Keybase' = ''
 | 
			
		||||
 | 
			
		||||
## additional applications
 | 
			
		||||
'balena-etcher' = ''
 | 
			
		||||
'Steam' = ''
 | 
			
		||||
'steam' = ''
 | 
			
		||||
'cs2' = ''
 | 
			
		||||
'rpcs3' = ''
 | 
			
		||||
'Ryujinx' = ''
 | 
			
		||||
'vlc' = ''
 | 
			
		||||
'org.qbittorrent.qBittorrent' = ''
 | 
			
		||||
'transmission-gtk' = ''
 | 
			
		||||
'Insomnia' = ''
 | 
			
		||||
'Bitwarden' = ''
 | 
			
		||||
'org.keepassxc.KeePassXC' = ''
 | 
			
		||||
'Spotify' = ''
 | 
			
		||||
'YouTube Music' = ''
 | 
			
		||||
'Alacritty' = ''
 | 
			
		||||
'kitty' = ''
 | 
			
		||||
'font-manager' = ''
 | 
			
		||||
'lutris' = ''
 | 
			
		||||
'/Wine/' = ''
 | 
			
		||||
'Arctype' = ''
 | 
			
		||||
'Around' = ''
 | 
			
		||||
'org.wezfurlong.wezterm' = ''
 | 
			
		||||
'mpv' = ''
 | 
			
		||||
 | 
			
		||||
"xdg-desktop-portal-gtk" = ""
 | 
			
		||||
"bottles" = ""
 | 
			
		||||
"youtube" = ""
 | 
			
		||||
"FreeTube" = ""
 | 
			
		||||
"com.github.tchx84.Flatseal" = ""
 | 
			
		||||
"deluge" = ""
 | 
			
		||||
"Nsxiv" = ""
 | 
			
		||||
 | 
			
		||||
"info.mumble.Mumble" = ""
 | 
			
		||||
"Vintage Story" = ""
 | 
			
		||||
@@ -6,38 +6,60 @@
 | 
			
		||||
    // Choose the order of the modules
 | 
			
		||||
    "modules-left": ["sway/workspaces", "sway/mode", "custom/media"],
 | 
			
		||||
    "modules-center": [],
 | 
			
		||||
    "modules-right": ["idle_inhibitor", "mpd", "pulseaudio", "network", "cpu", "memory", "temperature", "battery", "clock", "tray", "custom/swaync", "custom/emacsstatus"],
 | 
			
		||||
    //"modules-right": ["idle_inhibitor", "mpd", "pulseaudio", "network", "cpu", "memory", "temperature", "battery", "custom/scratchpad_indicator", "clock", "tray", "custom/swaync", "custom/emacsstatus" ],
 | 
			
		||||
    "modules-right": ["mpd", "pulseaudio", "network", "battery", "custom/scratchpad_indicator", "clock", "tray", "custom/swaync", "custom/emacsstatus" ],
 | 
			
		||||
    "sway/workspaces": {
 | 
			
		||||
       "disable-scroll-wraparound": true
 | 
			
		||||
    },
 | 
			
		||||
    // Modules configuration
 | 
			
		||||
    "sway/workspaces": {
 | 
			
		||||
    	"persistent_workspaces": {
 | 
			
		||||
	    "1": ["HDMI-A-1"],
 | 
			
		||||
	    "2": ["HDMI-A-1"],
 | 
			
		||||
	    "3": ["HDMI-A-1"],
 | 
			
		||||
	    "4": ["HDMI-A-1"],
 | 
			
		||||
	    "5": ["HDMI-A-1"],
 | 
			
		||||
	    "6": ["DVI-D-1"],
 | 
			
		||||
	    "7": ["DVI-D-1"],
 | 
			
		||||
	    "8": ["DVI-D-1"],
 | 
			
		||||
	    "9": ["DVI-D-1"],
 | 
			
		||||
	    "10": ["DVI-D-1"]
 | 
			
		||||
	    // "1": ["DVI-D-1"],
 | 
			
		||||
	    // "2": ["DVI-D-1"],
 | 
			
		||||
	    // "3": ["DVI-D-1"],
 | 
			
		||||
	    // "4": ["DVI-D-1"],
 | 
			
		||||
	    // "5": ["DVI-D-1"],
 | 
			
		||||
	    // "6": ["HDMI-A-1"],
 | 
			
		||||
	    // "7": ["HDMI-A-1"],
 | 
			
		||||
	    // "8": ["HDMI-A-1"],
 | 
			
		||||
	    // "9": ["HDMI-A-1"],
 | 
			
		||||
	    // "10": ["HDMI-A-1"],
 | 
			
		||||
	    //"1": ["HDMI-A-1"],
 | 
			
		||||
	    //"2": ["HDMI-A-1"],
 | 
			
		||||
	    //"3": ["HDMI-A-1"],
 | 
			
		||||
	    //"4": ["HDMI-A-1"],
 | 
			
		||||
	    //"5": ["HDMI-A-1"],
 | 
			
		||||
	    //"6": ["DVI-D-1"],
 | 
			
		||||
	    //"7": ["DVI-D-1"],
 | 
			
		||||
	    //"8": ["DVI-D-1"],
 | 
			
		||||
	    //"9": ["DVI-D-1"],
 | 
			
		||||
	    //"10": ["DVI-D-1"]
 | 
			
		||||
	},
 | 
			
		||||
    //     "disable-scroll": true,
 | 
			
		||||
         "all-outputs": false,
 | 
			
		||||
         "format": "{icon}",
 | 
			
		||||
         "format": "{name}",
 | 
			
		||||
         "format-icons": {
 | 
			
		||||
             "1": "1-em", // emacs
 | 
			
		||||
             "2": "2-se", // search/web
 | 
			
		||||
             "3": "3-tm", // terminal
 | 
			
		||||
             "4": "4-gm",
 | 
			
		||||
             "5": "5",
 | 
			
		||||
             "6": "6",
 | 
			
		||||
             "7": "7",
 | 
			
		||||
             "8": "8-sch", // schedule
 | 
			
		||||
             "9": "9-comms",
 | 
			
		||||
             "10": "10-mon", // monitor
 | 
			
		||||
             // "1": "1",
 | 
			
		||||
             // "2": "2",
 | 
			
		||||
             // "3": "3-sch", // schedule
 | 
			
		||||
             // "4": "4-comms",
 | 
			
		||||
             // "5": "5-mon", // monitor
 | 
			
		||||
             // "6": "6-em", // emacs
 | 
			
		||||
             // "7": "7-se", // search/web
 | 
			
		||||
             // "8": "8-tm", // terminal
 | 
			
		||||
             // "9": "9-gm",
 | 
			
		||||
             // "10": "10",
 | 
			
		||||
 | 
			
		||||
             //"1": "1-em", // emacs
 | 
			
		||||
             //"2": "2-se", // search/web
 | 
			
		||||
             //"3": "3-tm", // terminal
 | 
			
		||||
             //"4": "4-gm",
 | 
			
		||||
             //"5": "5",
 | 
			
		||||
             //"6": "6",
 | 
			
		||||
             //"7": "7",
 | 
			
		||||
             //"8": "8-sch", // schedule
 | 
			
		||||
             //"9": "9-comms",
 | 
			
		||||
             //"10": "10-mon", // monitor
 | 
			
		||||
         }
 | 
			
		||||
     },
 | 
			
		||||
    "keyboard-state": {
 | 
			
		||||
@@ -66,8 +88,10 @@
 | 
			
		||||
    "clock": {
 | 
			
		||||
        // "timezone": "America/New_York",
 | 
			
		||||
        "tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
 | 
			
		||||
        "format": "{:%Y-%m-%d %H:%M:%S}",
 | 
			
		||||
        "format": "{:%H:%M}",
 | 
			
		||||
        //"format": "{:%Y-%m-%d %H:%M:%S}",
 | 
			
		||||
        //"format": "{:%Y-%m-%d %I:%M:%S %p}",
 | 
			
		||||
        //"format": "day # {:%j}",
 | 
			
		||||
	"interval": 1
 | 
			
		||||
    },
 | 
			
		||||
    "cpu": {
 | 
			
		||||
@@ -96,7 +120,8 @@
 | 
			
		||||
        "format-ethernet": " {ifname}: {ipaddr}/{cidr}",
 | 
			
		||||
        "format-linked": " {ifname} (No IP)",
 | 
			
		||||
        "format-disconnected": "⚠ Disconnected",
 | 
			
		||||
        "format-alt": "{ifname}: {ipaddr}/{cidr}"
 | 
			
		||||
        //"format-alt": "{ifname}: {ipaddr}/{cidr}"
 | 
			
		||||
        "on-click": "$TERMINAL -e nmtui"
 | 
			
		||||
    },
 | 
			
		||||
    "pulseaudio": {
 | 
			
		||||
        // "scroll-step": 1, // %, can be a float
 | 
			
		||||
@@ -164,8 +189,18 @@
 | 
			
		||||
        "restart-interval": 1
 | 
			
		||||
    },
 | 
			
		||||
    "custom/emacsstatus": {
 | 
			
		||||
        "return-type": "json",
 | 
			
		||||
        "exec": "~/.config/waybar/scripts/emacs-status.sh",
 | 
			
		||||
        "on-click": "emacsclient -c || emacs",
 | 
			
		||||
	"format": "{}",
 | 
			
		||||
        "restart-interval": 3
 | 
			
		||||
    }
 | 
			
		||||
    },
 | 
			
		||||
    "custom/scratchpad_indicator": {
 | 
			
		||||
        "interval": 1,
 | 
			
		||||
        "return-type": "json",
 | 
			
		||||
        "exec": "swaymsg -t get_tree | jq --unbuffered --compact-output '( select(.name == \"root\") | .nodes[] | select(.name == \"__i3\") | .nodes[] | select(.name == \"__i3_scratch\") | .focus) as $scratch_ids | [..  | (.nodes? + .floating_nodes?) // empty | .[] | select(.id |IN($scratch_ids[]))] as $scratch_nodes | { text: \"\\($scratch_nodes | length)\", tooltip: $scratch_nodes | map(\"\\(.app_id // .window_properties.class) (\\(.id)): \\(.name)\") | join(\"\\n\") }'",
 | 
			
		||||
        "format": " {}",
 | 
			
		||||
        "on-click": "exec swaymsg 'scratchpad show'",
 | 
			
		||||
        "on-click-right": "exec swaymsg 'move scratchpad'"
 | 
			
		||||
    },
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,15 @@
 | 
			
		||||
inactive="{
 | 
			
		||||
\"text\": \"x\",
 | 
			
		||||
\"tooltip\": \"emacs is not running.\"
 | 
			
		||||
}\n"
 | 
			
		||||
active="{
 | 
			
		||||
\"text\": \"e+\",
 | 
			
		||||
\"tooltip\": \"emacs is running.\"
 | 
			
		||||
}\n"
 | 
			
		||||
pgrep emacs >/dev/null
 | 
			
		||||
if [ $? -eq 1 ]
 | 
			
		||||
then
 | 
			
		||||
echo 'X'
 | 
			
		||||
echo $inactive
 | 
			
		||||
else
 | 
			
		||||
echo 'e+'
 | 
			
		||||
echo $active
 | 
			
		||||
fi
 | 
			
		||||
 
 | 
			
		||||
@@ -1,44 +1,20 @@
 | 
			
		||||
* {
 | 
			
		||||
    border: none;
 | 
			
		||||
    border-radius: 0;
 | 
			
		||||
    font-family: IBMPlexMono, monospace;
 | 
			
		||||
    font-family: IBMPlexMono, monospace, 'Symbols Nerd Font';
 | 
			
		||||
    font-size: 10px;
 | 
			
		||||
    /*font-size: 14px;*/
 | 
			
		||||
    min-height: 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#workspaces {
 | 
			
		||||
    margin: 0 4px;
 | 
			
		||||
}
 | 
			
		||||
#workspaces button {
 | 
			
		||||
    /*background-color: #6B313D;*/
 | 
			
		||||
    /*color: #bbbbbb;*/
 | 
			
		||||
    background-color: #444444;
 | 
			
		||||
    color: #bbbbbb;
 | 
			
		||||
    padding: 0 8px;
 | 
			
		||||
    min-width: 0;
 | 
			
		||||
}
 | 
			
		||||
#workspaces button.persistent {
 | 
			
		||||
    /*background-color: #000000;*/
 | 
			
		||||
    background-color: #222222;
 | 
			
		||||
    color: #bbbbbb;
 | 
			
		||||
}
 | 
			
		||||
#workspaces button.focused {
 | 
			
		||||
    color: #000000;
 | 
			
		||||
    background-color: #888888;
 | 
			
		||||
    }
 | 
			
		||||
#workspaces button.visible {
 | 
			
		||||
    color: #000000;
 | 
			
		||||
    background-color: #888888;
 | 
			
		||||
}
 | 
			
		||||
#workspaces button.urgent {
 | 
			
		||||
    background-color: #eb4d4b;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
window#waybar {
 | 
			
		||||
    /*background-color: #000;*/
 | 
			
		||||
    background-color: #222222;
 | 
			
		||||
    color: #ffffff;
 | 
			
		||||
    /*background-color: #161616;*/
 | 
			
		||||
    /*background-color: transparent;*/
 | 
			
		||||
    /*background-color: #000;*/
 | 
			
		||||
    /*color: #ffffff;*/
 | 
			
		||||
    color: #999999;
 | 
			
		||||
    /*color: #bbbbbb;*/
 | 
			
		||||
    /*transition-property: background-color;*/
 | 
			
		||||
    /*transition-duration: .5s;*/
 | 
			
		||||
}
 | 
			
		||||
@@ -65,6 +41,35 @@ window#waybar.chromium {
 | 
			
		||||
    border: none;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
    /*background-color: #6B313D;*/
 | 
			
		||||
 | 
			
		||||
#workspaces button.persistent {
 | 
			
		||||
    background-color: transparent;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#workspaces button {
 | 
			
		||||
    transition: none;
 | 
			
		||||
    background-color: transparent;
 | 
			
		||||
    /*background-color: #444444;*/
 | 
			
		||||
    color: #bbbbbb;
 | 
			
		||||
    padding: 0 8px;
 | 
			
		||||
    min-width: 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/*#workspaces button.active {
 | 
			
		||||
    background-color: #444444;
 | 
			
		||||
    color: #bbbbbb;
 | 
			
		||||
}*/
 | 
			
		||||
 | 
			
		||||
#workspaces button.visible {
 | 
			
		||||
    /*color: #000000;
 | 
			
		||||
    background-color: #888888;*/
 | 
			
		||||
    box-shadow: inset 2px 2px #424242, inset -2px -2px #424242;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#workspaces button.urgent {
 | 
			
		||||
    background-color: #eb4d4b;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#mode {
 | 
			
		||||
    background-color: #64727D;
 | 
			
		||||
@@ -85,20 +90,27 @@ window#waybar.chromium {
 | 
			
		||||
#idle_inhibitor,
 | 
			
		||||
#bluetooth,
 | 
			
		||||
#custom-swaync,
 | 
			
		||||
#custom-scratchpad_indicator,
 | 
			
		||||
#custom-emacsstatus,
 | 
			
		||||
#mpd {
 | 
			
		||||
    padding: 0 6px;
 | 
			
		||||
    /*padding-right: 10px;*/
 | 
			
		||||
    border-right: 2px solid #424242;
 | 
			
		||||
    color: #999999;
 | 
			
		||||
    /*color: #bbbbbb;*/
 | 
			
		||||
    /*color: #ffffff*/
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* im using this near the right edge */
 | 
			
		||||
#custom-emacsstatus {
 | 
			
		||||
/* test {
 | 
			
		||||
    padding: 0 6px;
 | 
			
		||||
    color: #999999;
 | 
			
		||||
}
 | 
			
		||||
}*/
 | 
			
		||||
 | 
			
		||||
#window,
 | 
			
		||||
#workspaces {
 | 
			
		||||
    margin: 0 4px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* If workspaces is the leftmost module, omit left margin */
 | 
			
		||||
.modules-left > widget:first-child > #workspaces {
 | 
			
		||||
@@ -141,11 +153,11 @@ window#waybar.chromium {
 | 
			
		||||
#battery.critical:not(.charging) {
 | 
			
		||||
    background-color: #f53c3c;
 | 
			
		||||
    color: #ffffff;
 | 
			
		||||
    /*animation-name: blink;
 | 
			
		||||
    animation-name: blink;
 | 
			
		||||
    animation-duration: 0.5s;
 | 
			
		||||
    animation-timing-function: linear;
 | 
			
		||||
    animation-iteration-count: infinite;
 | 
			
		||||
    animation-direction: alternate;*/
 | 
			
		||||
    animation-direction: alternate;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
label:focus {
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										17
									
								
								home/default/.config/wofi/config
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								home/default/.config/wofi/config
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,17 @@
 | 
			
		||||
prompt=What do you want to run?
 | 
			
		||||
allow_markup=true
 | 
			
		||||
dmenu-parse_action=true
 | 
			
		||||
 | 
			
		||||
stylesheet=style.css
 | 
			
		||||
watch_css=true
 | 
			
		||||
colors=colors
 | 
			
		||||
 | 
			
		||||
width=400
 | 
			
		||||
lines=17
 | 
			
		||||
image_size=20
 | 
			
		||||
allow_images=true
 | 
			
		||||
hide_scroll=true
 | 
			
		||||
 | 
			
		||||
gtk_dark=true
 | 
			
		||||
 | 
			
		||||
layer=overlay
 | 
			
		||||
							
								
								
									
										18
									
								
								home/default/.config/wofi/style.css
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								home/default/.config/wofi/style.css
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,18 @@
 | 
			
		||||
#outer-box {
 | 
			
		||||
  padding: 4px;
 | 
			
		||||
}
 | 
			
		||||
#window {
 | 
			
		||||
  /*background: rgba(41, 46, 66, 0.5);
 | 
			
		||||
  /*margin: auto;
 | 
			
		||||
  padding: 10px;
 | 
			
		||||
  border-radius: 20px;
 | 
			
		||||
  border: 5px solid #b072d1;*/
 | 
			
		||||
  background: rgba(22, 22, 22, 0.8);
 | 
			
		||||
}
 | 
			
		||||
/*#entry:selected {
 | 
			
		||||
background-color: rgba(0,0,0,0);
 | 
			
		||||
} 
 | 
			
		||||
 #text:selected {
 | 
			
		||||
background-color: red;
 | 
			
		||||
}*/
 | 
			
		||||
* { font-family: 'IBM Plex Serif';}
 | 
			
		||||
@@ -11,11 +11,9 @@ setopt interactive_comments
 | 
			
		||||
# History in cache directory:
 | 
			
		||||
HISTSIZE=10000000
 | 
			
		||||
SAVEHIST=10000000
 | 
			
		||||
[ -f "${XDG_CONFIG_HOME:-$HOME/.cache}/zsh/" ] && mkdir ${XDG_CACHE_HOME:-$HOME/.cache}/zsh/
 | 
			
		||||
[ -d  "${XDG_CONFIG_HOME:-$HOME/.cache}/zsh/" ] || mkdir ${XDG_CACHE_HOME:-$HOME/.cache}/zsh/
 | 
			
		||||
HISTFILE="${XDG_CACHE_HOME:-$HOME/.cache}/zsh/history"
 | 
			
		||||
 | 
			
		||||
# Load aliases and shortcuts if existent.
 | 
			
		||||
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc" ] && source "${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc"
 | 
			
		||||
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/aliasrc" ] && source "${XDG_CONFIG_HOME:-$HOME/.config}/shell/aliasrc"
 | 
			
		||||
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/privrc" ] && source "${XDG_CONFIG_HOME:-$HOME/.config}/shell/privrc"
 | 
			
		||||
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/zshnameddirrc" ] && source "${XDG_CONFIG_HOME:-$HOME/.config}/shell/zshnameddirrc"
 | 
			
		||||
@@ -92,7 +90,5 @@ function osc7 {
 | 
			
		||||
autoload -Uz add-zsh-hook
 | 
			
		||||
add-zsh-hook -Uz chpwd osc7
 | 
			
		||||
 | 
			
		||||
[ ! -f ${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc ] && setsid shortcuts >/dev/null 2>&1
 | 
			
		||||
 | 
			
		||||
# Load syntax highlighting; should be last.
 | 
			
		||||
source /usr/share/zsh/plugins/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh 2>/dev/null
 | 
			
		||||
 
 | 
			
		||||
@@ -8,3 +8,4 @@ case "$(file --dereference --brief --mime-type -- "/tmp/convert-paste-png.data")
 | 
			
		||||
	image/png) wl-paste -t image/png > "$1" ;;
 | 
			
		||||
esac
 | 
			
		||||
 | 
			
		||||
rm /tmp/convert-paste-png.data
 | 
			
		||||
 
 | 
			
		||||
@@ -1,2 +1,7 @@
 | 
			
		||||
#!/bin/sh
 | 
			
		||||
setsid -f emacsclient --alternate-editor='emacs' $@ >/dev/null 2>&1
 | 
			
		||||
if [ -z $1 ]
 | 
			
		||||
then
 | 
			
		||||
  emacsclient -nw -c --alternate-editor='emacs -nw' .
 | 
			
		||||
else
 | 
			
		||||
  emacsclient -nw -c --alternate-editor='emacs -nw' "$@"
 | 
			
		||||
fi
 | 
			
		||||
 
 | 
			
		||||
@@ -1,2 +0,0 @@
 | 
			
		||||
#!/bin/sh
 | 
			
		||||
emacsclient -nw -c --alternate-editor='emacs -nw' $@
 | 
			
		||||
							
								
								
									
										7
									
								
								home/default/.local/bin/emo
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										7
									
								
								home/default/.local/bin/emo
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,7 @@
 | 
			
		||||
#!/bin/sh
 | 
			
		||||
if [ -z "$1" ]
 | 
			
		||||
then
 | 
			
		||||
  setsid -f emacsclient . >/dev/null 2>&1 || setsid -f emacs . >/dev/null 2>&1
 | 
			
		||||
else
 | 
			
		||||
  setsid -f emacsclient "$@" >/dev/null 2>&1 || setsid -f emacs "$@" >/dev/null 2>&1
 | 
			
		||||
fi
 | 
			
		||||
@@ -6,7 +6,9 @@ directory="$HOME/Music"
 | 
			
		||||
case "$file" in
 | 
			
		||||
	*youtube.com*|*youtu.be*|*bandcamp.com*|*soundcloud.com*)
 | 
			
		||||
		notify-send "Downloading" "$file"
 | 
			
		||||
		cd $directory && yt-dlp --embed-metadata --embed-thumbnail -xc -f bestaudio/best --restrict-filenames "$file" && notify-send "Music added!" "$file is now saved to the music directory."
 | 
			
		||||
		cd $directory && yt-dlp --embed-metadata --embed-thumbnail -xc -f 'bestaudio[ext=m4a]' "$file" && notify-send "Music added!" "$file is now saved to the music directory."
 | 
			
		||||
		# --restrict-filenames
 | 
			
		||||
		# -f bestaudio/best
 | 
			
		||||
	;;
 | 
			
		||||
	*mp3|*flac|*opus|*mp3?source*)
 | 
			
		||||
		notify-send "⏳ Queuing $file..."
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										4
									
								
								home/default/.local/bin/pind
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										4
									
								
								home/default/.local/bin/pind
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,4 @@
 | 
			
		||||
#!/bin/sh
 | 
			
		||||
[ -z "$1" ] && echo 'usage: pind <url>' && exit 1
 | 
			
		||||
read url < <(curl -Ls "$1" | pup 'img attr{src}')
 | 
			
		||||
curl -LO --no-clobber $url && echo "$url downloaded"
 | 
			
		||||
@@ -27,6 +27,7 @@ fi
 | 
			
		||||
if [[ -N $file ]]; then
 | 
			
		||||
  echo "screenshot saved."
 | 
			
		||||
  notify-send "screenshot saved." -i $file
 | 
			
		||||
  update-recentf.py $file
 | 
			
		||||
  exit 0
 | 
			
		||||
else
 | 
			
		||||
  echo "screenshot failed."
 | 
			
		||||
 
 | 
			
		||||
@@ -1,43 +0,0 @@
 | 
			
		||||
#!/bin/sh
 | 
			
		||||
 | 
			
		||||
bmdirs="${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs"
 | 
			
		||||
bmfiles="${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-files"
 | 
			
		||||
 | 
			
		||||
# Output locations. Unactivated progs should go to /dev/null.
 | 
			
		||||
shell_shortcuts="${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc"
 | 
			
		||||
zsh_named_dirs="${XDG_CONFIG_HOME:-$HOME/.config}/shell/zshnameddirrc"
 | 
			
		||||
lf_shortcuts="${XDG_CONFIG_HOME:-$HOME/.config}/lf/shortcutrc"
 | 
			
		||||
vim_shortcuts="${XDG_CONFIG_HOME:-$HOME/.config}/nvim/shortcuts.vim"
 | 
			
		||||
ranger_shortcuts="/dev/null"
 | 
			
		||||
qute_shortcuts="/dev/null"
 | 
			
		||||
fish_shortcuts="/dev/null"
 | 
			
		||||
vifm_shortcuts="/dev/null"
 | 
			
		||||
 | 
			
		||||
# Remove, prepare files
 | 
			
		||||
rm -f "$lf_shortcuts" "$ranger_shortcuts" "$qute_shortcuts" "$zsh_named_dirs" "$vim_shortcuts" 2>/dev/null
 | 
			
		||||
printf "# vim: filetype=sh\\n" > "$fish_shortcuts"
 | 
			
		||||
printf "# vim: filetype=sh\\nalias " > "$shell_shortcuts"
 | 
			
		||||
printf "\" vim: filetype=vim\\n" > "$vifm_shortcuts"
 | 
			
		||||
 | 
			
		||||
# Format the `directories` file in the correct syntax and sent it to all three configs.
 | 
			
		||||
eval "echo \"$(cat "$bmdirs")\"" | \
 | 
			
		||||
awk "!/^\s*#/ && !/^\s*\$/ {gsub(\"\\\s*#.*$\",\"\");
 | 
			
		||||
	printf(\"%s=\42cd %s && ls -a\42 \\\\\n\",\$1,\$2)   >> \"$shell_shortcuts\" ;
 | 
			
		||||
	printf(\"hash -d %s=%s \n\",\$1,\$2)                 >> \"$zsh_named_dirs\"  ;
 | 
			
		||||
	printf(\"abbr %s \42cd %s; and ls -a\42\n\",\$1,\$2) >> \"$fish_shortcuts\"  ;
 | 
			
		||||
	printf(\"map g%s :cd %s<CR>\nmap t%s <tab>:cd %s<CR><tab>\nmap M%s <tab>:cd %s<CR><tab>:mo<CR>\nmap Y%s <tab>:cd %s<CR><tab>:co<CR> \n\",\$1,\$2, \$1, \$2, \$1, \$2, \$1, \$2)       >> \"$vifm_shortcuts\" ;
 | 
			
		||||
	printf(\"config.bind(';%s', \42set downloads.location.directory %s ;; hint links download\42) \n\",\$1,\$2) >> \"$qute_shortcuts\" ;
 | 
			
		||||
	printf(\"map g%s cd %s\nmap t%s tab_new %s\nmap m%s shell mv -v %%s %s\nmap Y%s shell cp -rv %%s %s \n\",\$1,\$2,\$1,\$2, \$1, \$2, \$1, \$2) >> \"$ranger_shortcuts\" ;
 | 
			
		||||
	printf(\"map C%s cd \42%s\42 \n\",\$1,\$2)           >> \"$lf_shortcuts\" ;
 | 
			
		||||
	printf(\"cmap ;%s %s\n\",\$1,\$2)                    >> \"$vim_shortcuts\" }"
 | 
			
		||||
 | 
			
		||||
# Format the `files` file in the correct syntax and sent it to both configs.
 | 
			
		||||
eval "echo \"$(cat "$bmfiles")\"" | \
 | 
			
		||||
awk "!/^\s*#/ && !/^\s*\$/ {gsub(\"\\\s*#.*$\",\"\");
 | 
			
		||||
	printf(\"%s=\42\$EDITOR %s\42 \\\\\n\",\$1,\$2)  >> \"$shell_shortcuts\" ;
 | 
			
		||||
	printf(\"hash -d %s=%s \n\",\$1,\$2)             >> \"$zsh_named_dirs\"  ;
 | 
			
		||||
	printf(\"abbr %s \42\$EDITOR %s\42 \n\",\$1,\$2) >> \"$fish_shortcuts\"  ;
 | 
			
		||||
	printf(\"map %s :e %s<CR> \n\",\$1,\$2)          >> \"$vifm_shortcuts\"  ;
 | 
			
		||||
	printf(\"map %s shell \$EDITOR %s \n\",\$1,\$2)  >> \"$ranger_shortcuts\" ;
 | 
			
		||||
	printf(\"map E%s \$\$EDITOR \42%s\42 \n\",\$1,\$2)   >> \"$lf_shortcuts\" ;
 | 
			
		||||
	printf(\"cmap ;%s %s\n\",\$1,\$2)                    >> \"$vim_shortcuts\" }"
 | 
			
		||||
							
								
								
									
										293
									
								
								home/default/.local/bin/sway-select-window
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										293
									
								
								home/default/.local/bin/sway-select-window
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,293 @@
 | 
			
		||||
#!/usr/bin/env bash
 | 
			
		||||
# https://gitlab.com/wef/dotfiles/-/blob/master/bin/sway-select-window
 | 
			
		||||
# shellcheck disable=SC2034
 | 
			
		||||
TIME_STAMP="20230129.084152"
 | 
			
		||||
 | 
			
		||||
# Copyright (C) 2019-2023 Bob Hepple <bob dot hepple at gmail dot com>
 | 
			
		||||
 | 
			
		||||
# This program is free software: you can redistribute it and/or modify
 | 
			
		||||
# it under the terms of the GNU General Public License as published by
 | 
			
		||||
# the Free Software Foundation, either version 3 of the License, or (at
 | 
			
		||||
# your option) any later version.
 | 
			
		||||
# 
 | 
			
		||||
# This program is distributed in the hope that it will be useful, but
 | 
			
		||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
			
		||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 | 
			
		||||
# General Public License for more details.
 | 
			
		||||
# 
 | 
			
		||||
# You should have received a copy of the GNU General Public License
 | 
			
		||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 | 
			
		||||
# CUSTOMISE HERE IF YOU'RE NOT GETTING ALL YOUR ICONS:
 | 
			
		||||
 | 
			
		||||
# This array contains my most commonly used apps on f34, cached here
 | 
			
		||||
# for speed. If they don't work for you, you can either just remove
 | 
			
		||||
# these entries and rely on on-the-fly lookup of icons (which may be
 | 
			
		||||
# slow). Or, for speedier operation, you can:
 | 
			
		||||
 | 
			
		||||
# 1. get all your common apps running
 | 
			
		||||
# 2. remove the entries in the array
 | 
			
		||||
# 3. run the script from the CLI
 | 
			
		||||
# 4. copy-paste the list of "[app]=icon" lines into the array
 | 
			
		||||
 | 
			
		||||
# Also, if all else fails, you can hardcode your app here:
 | 
			
		||||
declare -A icons=(
 | 
			
		||||
    [floating-kitty]=/usr/share/icons/hicolor/256x256/apps/kitty.png
 | 
			
		||||
    [kitty]=/usr/share/icons/hicolor/256x256/apps/kitty.png
 | 
			
		||||
    [foot]=/usr/share/icons/hicolor/48x48/apps/foot.png
 | 
			
		||||
    [emacs]=/usr/share/icons/breeze/apps/48/emacs.svg
 | 
			
		||||
    [firefox]=/usr/share/icons/hicolor/48x48/apps/firefox.png
 | 
			
		||||
    [mythfrontend]=/usr/share/pixmaps/mythfrontend.png
 | 
			
		||||
    [kitty]=/usr/share/icons/hicolor/256x256/apps/kitty.png
 | 
			
		||||
    [Gdcalc]=/usr/share/pixmaps/HP-16C-48.xpm
 | 
			
		||||
    [pavucontrol]=/usr/share/icons/gnome/48x48/apps/multimedia-volume-control.png
 | 
			
		||||
    [pulseeffects]=/usr/share/icons/hicolor/scalable/apps/pulseeffects.svg
 | 
			
		||||
    [blueman-manager]=/usr/share/icons/hicolor/scalable/apps/blueman.svg
 | 
			
		||||
    [gnome-system-monitor]=/usr/share/icons/hicolor/scalable/apps/org.gnome.SystemMonitor.svg
 | 
			
		||||
    [gnome-disks]=/usr/share/icons/hicolor/scalable/apps/org.gnome.DiskUtility.svg
 | 
			
		||||
    [org.gnome.Weather]=/usr/share/icons/hicolor/scalable/apps/org.gnome.Weather.svg
 | 
			
		||||
    [xfce4-appfinder]=/usr/share/icons/hicolor/scalable/apps/org.xfce.appfinder.svg
 | 
			
		||||
    [LibreWolf]=/var/lib/flatpak/exports/share/icons/hicolor/128x128/apps/io.gitlab.librewolf-community.png
 | 
			
		||||
    [firefox]=/var/lib/flatpak/exports/share/icons/hicolor/128x128/apps/org.mozilla.firefox.png
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
KEYBOARD_DEVICE="/dev/input/event4"
 | 
			
		||||
verbose=""
 | 
			
		||||
 | 
			
		||||
PROG=$( basename "$0" )
 | 
			
		||||
case "$1" in
 | 
			
		||||
    -h|--help)
 | 
			
		||||
        echo "Usage: $PROG"
 | 
			
		||||
        echo
 | 
			
		||||
        echo "show running programs and select one to display (uses wofi)."
 | 
			
		||||
        
 | 
			
		||||
        echo "If evtest(1) is installed and sudo is available then you can press"
 | 
			
		||||
        echo "Shift-Enter to move the window here rather than move to"
 | 
			
		||||
        echo "the windows workspace. You may need to change KEYBOARD_DEVICE above."
 | 
			
		||||
 | 
			
		||||
        exit 0
 | 
			
		||||
        ;;
 | 
			
		||||
    -v|--verbose)
 | 
			
		||||
        verbose="set"
 | 
			
		||||
        shift
 | 
			
		||||
        ;;
 | 
			
		||||
esac
 | 
			
		||||
 | 
			
		||||
jq_get_windows='
 | 
			
		||||
     # descend to workspace or scratchpad
 | 
			
		||||
     .nodes[].nodes[]
 | 
			
		||||
     # save workspace name as .w
 | 
			
		||||
     | {"w": .name} + (
 | 
			
		||||
       if (.nodes|length) > 0 then # workspace
 | 
			
		||||
         [recurse(.nodes[])]
 | 
			
		||||
       else # scratchpad
 | 
			
		||||
         []
 | 
			
		||||
       end
 | 
			
		||||
       + .floating_nodes
 | 
			
		||||
       | .[]
 | 
			
		||||
       # select nodes with no children (windows)
 | 
			
		||||
       | select(.nodes==[])
 | 
			
		||||
     )'
 | 
			
		||||
 | 
			
		||||
jq_windows_to_tsv='
 | 
			
		||||
    [
 | 
			
		||||
      (.id | tostring),
 | 
			
		||||
      # remove markup and index from workspace name, replace scratch with "[S]"
 | 
			
		||||
      (.w | gsub("<[^>]*>|:$"; "") | sub("__i3_scratch"; "[S]")),
 | 
			
		||||
      # get app name (or window class if xwayland)
 | 
			
		||||
      (.app_id // .window_properties.class),
 | 
			
		||||
      (.name),
 | 
			
		||||
      (.pid)
 | 
			
		||||
    ]
 | 
			
		||||
    | @tsv'
 | 
			
		||||
 | 
			
		||||
get_fs_win_in_ws() {
 | 
			
		||||
    id="${1:?}"
 | 
			
		||||
 | 
			
		||||
    swaymsg -t get_tree |
 | 
			
		||||
    jq -e -r --argjson id "$id" "
 | 
			
		||||
    [ $jq_get_windows  ]
 | 
			
		||||
    | (.[]|select(.id == \$id)) as \$selected_workspace
 | 
			
		||||
    | .[]
 | 
			
		||||
    | select( .w == \$selected_workspace.w and .fullscreen_mode == 1 )
 | 
			
		||||
    | $jq_windows_to_tsv
 | 
			
		||||
    "
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
get_hardcoded_icon() {
 | 
			
		||||
    icon="${icons[$1]}"
 | 
			
		||||
    echo "$icon"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
get_desktop() {
 | 
			
		||||
    app="$1"
 | 
			
		||||
    p="/usr/share/applications"
 | 
			
		||||
 | 
			
		||||
    # fast and easy cases first:
 | 
			
		||||
    for prefix in "" org.kde. org.gnome. org.freedesktop.; do
 | 
			
		||||
        d="$p/$prefix$app.desktop"
 | 
			
		||||
        [[ -r "$d" ]] && echo "$d" && return
 | 
			
		||||
    done
 | 
			
		||||
 | 
			
		||||
    # maybe lowercase
 | 
			
		||||
    for prefix in "" org.kde. org.gnome. org.freedesktop.; do
 | 
			
		||||
        d="$p/$prefix${app,,}.desktop"
 | 
			
		||||
        [[ -r "$d" ]] && echo "$d" && return
 | 
			
		||||
    done
 | 
			
		||||
 | 
			
		||||
    # this is fairly reliable but slow:
 | 
			
		||||
    # look for a .desktop file with Exec=$app eg
 | 
			
		||||
    # gnome-disks (but exclude gnome-disk-image-writer.desktop)
 | 
			
		||||
    # gnome-font-viewer
 | 
			
		||||
    GREP='egrep -r'
 | 
			
		||||
    type rg &>/dev/null && GREP=rg
 | 
			
		||||
    d=$( $GREP -il "^exec=$app( %u)*[[:space:]]*$" $p | head -n 1)
 | 
			
		||||
    [[ -r "$d" ]] && echo "$d" && return
 | 
			
		||||
 | 
			
		||||
    # desperation - weird apps like com.github.wwmm.pulseeffects.desktop!!
 | 
			
		||||
    # shellcheck disable=SC2012
 | 
			
		||||
    d=$( ls "$p/"*".$app.desktop" 2>/dev/null | head -n 1 )
 | 
			
		||||
    [[ -r "$d" ]] && echo "$d" && return
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
get_icon() {
 | 
			
		||||
    icon_locations=(
 | 
			
		||||
        icons/hicolor/scalable/apps
 | 
			
		||||
        icons/hicolor/48x48/apps
 | 
			
		||||
        icons/hicolor/128x128/apps
 | 
			
		||||
        icons/hicolor/256x256/apps
 | 
			
		||||
        icons/gnome/48x48/apps
 | 
			
		||||
        icons/gnome/48x48/devices
 | 
			
		||||
        pixmaps
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    app="$1"
 | 
			
		||||
 | 
			
		||||
    icon=$( get_hardcoded_icon "$app_name" )
 | 
			
		||||
    [[ "$icon" && -r "$icon" ]] && echo "$icon" && return
 | 
			
		||||
 | 
			
		||||
    # let's go poke in the .desktop files:
 | 
			
		||||
    icon_name=""
 | 
			
		||||
    dt=$( get_desktop "$app" )
 | 
			
		||||
 | 
			
		||||
    # sometimes we get the 'class' rather than the exe - so try this:
 | 
			
		||||
    [[ "$dt" ]] || {
 | 
			
		||||
        app=$( tr '\0' '\n' < "/proc/$pid/cmdline" | head -n 1 )
 | 
			
		||||
        dt=$( get_desktop "$( basename "$app" )" )
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    [[ "$dt" ]] && {
 | 
			
		||||
        icon_name=$( awk -v IGNORECASE="set" -F"=" '/^icon/ {print $2}' "$dt" )
 | 
			
		||||
        [[ "$icon_name" ]] && {
 | 
			
		||||
            for d in "${icon_locations[@]}"; do
 | 
			
		||||
                for s in .svg .png ""; do
 | 
			
		||||
                    icon=/usr/share/$d/$icon_name$s
 | 
			
		||||
                    [[ -r $icon ]] && echo "$icon" && return
 | 
			
		||||
                done
 | 
			
		||||
            done
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    # desperation street:
 | 
			
		||||
    icon=$( find /usr/share/icons /usr/share/pixmaps | grep -E -i "/$app.(png|svg)" | head -n 1 )
 | 
			
		||||
    [[ "$icon" && -r "$icon" ]] && echo "$icon" && return
 | 
			
		||||
 | 
			
		||||
    # failed:
 | 
			
		||||
    #echo "/usr/share/icons/Adwaita/32x32/status/image-missing-symbolic.symbolic.png"
 | 
			
		||||
    echo "$HOME/.local/share/icons/img-missing-sym.png"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
focus_window() {
 | 
			
		||||
    id="${1}"
 | 
			
		||||
    ws_name="${2}"
 | 
			
		||||
    app_name="${3}"
 | 
			
		||||
    win_title="${4}"
 | 
			
		||||
 | 
			
		||||
    [[ "$verbose" ]] && printf "focusing window (in workspace %s): [%s] (%s) \`%s\`\n" "$ws_name" "$id" "$app_name" "$win_title" >&2
 | 
			
		||||
 | 
			
		||||
    # look for fullscreen among other windows in selected window's workspace
 | 
			
		||||
    if fs_win_tsv="$( get_fs_win_in_ws "$id" )" ; then
 | 
			
		||||
        read -r win_id ws_name app_name win_title <<<"$fs_win_tsv"
 | 
			
		||||
        if [ "$win_id" != "$id" ] ; then
 | 
			
		||||
            [[ "$verbose" ]] && printf 'found fullscreen window in target workspace (%s): [%s] (%s) "%s"\n' "$ws_name" "$win_id" "$app_name" "$win_title" >&2
 | 
			
		||||
            swaymsg "[con_id=$win_id] fullscreen disable"
 | 
			
		||||
        fi
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    swaymsg "[con_id=$id]" focus
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
id_fmt='<span stretch="ultracondensed" size="xx-small">%s</span>'
 | 
			
		||||
ws_fmt='<span size="small">%s</span>'
 | 
			
		||||
app_fmt='<span weight="bold">%s</span>'
 | 
			
		||||
title_fmt='<span style="italic">%s</span>'
 | 
			
		||||
 | 
			
		||||
#id_fmt='%s'
 | 
			
		||||
#ws_fmt='%s'
 | 
			
		||||
#app_fmt='%s'
 | 
			
		||||
#title_fmt='%s'
 | 
			
		||||
 | 
			
		||||
# allow Alt+Tab etc to not be caught by sway:
 | 
			
		||||
trap 'swaymsg "mode default"' EXIT
 | 
			
		||||
swaymsg "mode passthrough"
 | 
			
		||||
 | 
			
		||||
swaymsg -t get_tree |
 | 
			
		||||
# get list of windows as tab-separated columns
 | 
			
		||||
jq -r "$jq_get_windows | $jq_windows_to_tsv" |
 | 
			
		||||
# align columns w/ spaces (keep tab as separator)
 | 
			
		||||
column -s $'\t' -o $'\t' -t |
 | 
			
		||||
# pango format the window list
 | 
			
		||||
while IFS=$'\t' read -r win_id ws_name app_name win_title pid; do
 | 
			
		||||
    shopt -s extglob
 | 
			
		||||
    app_name="${app_name%%*( )}"
 | 
			
		||||
    icon=$( get_icon "$app_name" "$pid" )
 | 
			
		||||
    [[ "$verbose" ]] && printf "[%s]=>%s\n" "$app_name" "$icon" >&2
 | 
			
		||||
    # shellcheck disable=SC2059
 | 
			
		||||
    # hide win_id for now
 | 
			
		||||
    #win_id=""
 | 
			
		||||
    # simplify ws_name instead of Scratch
 | 
			
		||||
    #(( ${#ws_name} > 8 )) && ws_name="${ws_name:0:1}"
 | 
			
		||||
    printf "img:$icon:text:${id_fmt}\t${ws_fmt}\t${app_fmt}\t${title_fmt}\n" \
 | 
			
		||||
           "$win_id" \
 | 
			
		||||
           "$ws_name" \
 | 
			
		||||
           "$app_name" \
 | 
			
		||||
           "$win_title"
 | 
			
		||||
done |
 | 
			
		||||
# sort by workspace name and then app_name:
 | 
			
		||||
sort -k2 -k3 |
 | 
			
		||||
# defeat the initial cache in order to preserve the order:
 | 
			
		||||
wofi -m --cache-file=/dev/null --insensitive --allow-images --show dmenu --prompt='Focus a window' | {
 | 
			
		||||
    FS=$'\t' read -r win_id ws_name app_name win_title
 | 
			
		||||
    # printf "win_id='$win_id' ws_name='$ws_name' app_name='$app_name' win_title='$win_title'" >&2
 | 
			
		||||
    # use evtest (if installed) to detect the state of the left shift
 | 
			
		||||
    # key and if it's 'down' then move the window here rather than move
 | 
			
		||||
    # to the window's workspace. Should be safe if evtest or sudo are
 | 
			
		||||
    # not available.
 | 
			
		||||
    ## i've disabled this
 | 
			
		||||
    type evtest && sudo evtest --query $KEYBOARD_DEVICE EV_KEY KEY_LEFTSHIFT
 | 
			
		||||
    SHIFT_STATE=$?
 | 
			
		||||
    if [[ "$win_id" ]]; then
 | 
			
		||||
        if (( SHIFT_STATE == 10 )); then
 | 
			
		||||
            # bring the window here
 | 
			
		||||
            swaymsg "[con_id=$win_id] move window to workspace current, focus"
 | 
			
		||||
        else
 | 
			
		||||
            focus_window "$win_id" "$ws_name" "$app_name" "$win_title"
 | 
			
		||||
        fi
 | 
			
		||||
    fi
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
exit 0
 | 
			
		||||
 | 
			
		||||
# this is the example documented in 'man 7 wofi' but it doesn't understand the scratchpad:
 | 
			
		||||
swaymsg -t get_tree |
 | 
			
		||||
jq -r '.nodes[].nodes[] | if .nodes then [recurse(.nodes[])] else [] end +  .floating_nodes  |  .[]  |  select(.nodes==[]) | ((.id | tostring) + " " + .name)' |
 | 
			
		||||
wofi --show dmenu | {
 | 
			
		||||
    read -r id name
 | 
			
		||||
    swaymsg "[con_id=$id]" focus
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
# Local Variables:
 | 
			
		||||
# mode: shell-script
 | 
			
		||||
# time-stamp-pattern: "4/TIME_STAMP=\"%:y%02m%02d.%02H%02M%02S\""
 | 
			
		||||
# eval: (add-hook 'before-save-hook 'time-stamp)
 | 
			
		||||
# End:
 | 
			
		||||
@@ -7,7 +7,8 @@ case "$(readlink -f /sbin/init)" in
 | 
			
		||||
	*) ctl='loginctl' ;;
 | 
			
		||||
esac
 | 
			
		||||
 | 
			
		||||
case "$(printf "🔒 lock\n🚪 leave $WM\n♻️ renew $WM\n🐻 hibernate\n🔃 reboot\n🖥️ shutdown\n💤 sleep\n📺 display off\n set background\n start idle\n kill swayidle\n fcitx5\n kill fcitx5\n start emacs daemon\n kill emacs daemon\n restart emacs daemon" | rofi -dmenu -i -l 16 -p 'action')" in
 | 
			
		||||
#case "$(printf "🔒 lock\n🚪 leave $WM\n♻️ renew $WM\n🐻 hibernate\n🔃 reboot\n🖥️ shutdown\n💤 sleep\n📺 display off\n set background\n start idle\n kill swayidle\n fcitx5\n kill fcitx5\n start emacs daemon\n kill emacs daemon\n restart emacs daemon" | rofi -dmenu -i -l 16 -p 'action')" in
 | 
			
		||||
case "$(printf "🔒 lock\n🚪 leave $WM\n♻️ renew $WM\n🐻 hibernate\n🔃 reboot\n🖥️ shutdown\n💤 sleep\n📺 display off\n set background\n start idle\n kill swayidle\n fcitx5\n kill fcitx5\n start emacs daemon\n kill emacs daemon\n restart emacs daemon" | wofi -L 17 --cache-file=/dev/null --show=dmenu -i -p 'action')" in
 | 
			
		||||
	'🔒 lock')
 | 
			
		||||
		setsid -f swaylock
 | 
			
		||||
		setsid -f sleep 2 && swayidle -w timeout 1 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on" && kill $#'
 | 
			
		||||
@@ -24,6 +25,9 @@ case "$(printf "🔒 lock\n🚪 leave $WM\n♻️ renew $WM\n🐻 hibernate\n
 | 
			
		||||
	' kill swayidle') killall swayidle && notify-send 'idle killed.';;
 | 
			
		||||
	' fcitx5') fcitx5 ;;
 | 
			
		||||
	' kill fcitx5') killall fcitx5 ;;
 | 
			
		||||
	#' start emacs daemon') emacs --daemon && emacsclient -c ;;
 | 
			
		||||
	#' kill emacs daemon') emacsclient -e '(kill-emacs)' ;;
 | 
			
		||||
	#' restart emacs daemon') emacsclient -e '(kill-emacs)' ; emacs --daemon && emacsclient -c ;;
 | 
			
		||||
	' start emacs daemon') emacs --daemon && notify-send 'emacs daemon started' ;;
 | 
			
		||||
	' kill emacs daemon') emacsclient -e '(kill-emacs)'  && notify-send 'emacs daemon killed' ;;
 | 
			
		||||
	' restart emacs daemon') emacsclient -e '(kill-emacs)' && notify-send 'emacs daemon killed' ; emacs --daemon && notify-send 'emacs daemon started' ;;
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										13
									
								
								home/default/.local/bin/update-recentf.py
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										13
									
								
								home/default/.local/bin/update-recentf.py
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,13 @@
 | 
			
		||||
#!/usr/bin/python3
 | 
			
		||||
 | 
			
		||||
import gi, sys
 | 
			
		||||
gi.require_version('Gtk', '3.0')
 | 
			
		||||
from gi.repository import Gtk, Gio, GLib
 | 
			
		||||
 | 
			
		||||
rec_mgr = Gtk.RecentManager.get_default()
 | 
			
		||||
 | 
			
		||||
for arg in sys.argv[1:]:
 | 
			
		||||
    rec_mgr.add_item(Gio.File.new_for_path(arg).get_uri())
 | 
			
		||||
 | 
			
		||||
GLib.idle_add(Gtk.main_quit)
 | 
			
		||||
Gtk.main()
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
[Desktop Entry]
 | 
			
		||||
Type=Application
 | 
			
		||||
Name=Whatsapp
 | 
			
		||||
Exec=/usr/bin/librewolf -P wa https://web.whatsapp.com
 | 
			
		||||
Exec=io.gitlab.librewolf-community -P whatsapp --new-window https://web.whatsapp.com
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										
											BIN
										
									
								
								home/default/.local/share/icons/img-missing-sym.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								home/default/.local/share/icons/img-missing-sym.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 546 B  | 
							
								
								
									
										
											BIN
										
									
								
								home/default/.local/share/icons/img-missing-sym2.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								home/default/.local/share/icons/img-missing-sym2.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 546 B  | 
							
								
								
									
										115
									
								
								instructions.org
									
									
									
									
									
								
							
							
						
						
									
										115
									
								
								instructions.org
									
									
									
									
									
								
							@@ -35,17 +35,17 @@ sha256sum -c *-CHECKSUM
 | 
			
		||||
 | 
			
		||||
differences/notes before continuing with the installation:
 | 
			
		||||
 | 
			
		||||
1. some dependencies aren't available with 'fedora custom operating system'. before installing snapper make sure to install these packages:
 | 
			
		||||
1. some dependencies aren't available with 'fedora custom operating system'. before installing snapper install these packages:
 | 
			
		||||
 | 
			
		||||
#+BEGIN_SRC sh
 | 
			
		||||
sudo dnf install neovim sway firefox locate git bzip2
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
a) neovim is the text editor of my choice
 | 
			
		||||
b) install a browser such as firefox to follow along guide
 | 
			
		||||
c) locate, git, bzip2 are the missing dependencies not included in the guide.
 | 
			
		||||
- ~neovim~: a text editor to edit files
 | 
			
		||||
- ~firefox~: a browser to follow along guide
 | 
			
		||||
- ~locate~, ~git~, ~bzip2~: missing dependencies not included in the guide.
 | 
			
		||||
 | 
			
		||||
2. software selection will be 'fedora custom operating system'
 | 
			
		||||
2. software selection will be =fedora custom operating system=
 | 
			
		||||
 | 
			
		||||
boot your fedora installer media and follow this guide, make sure to boot with EUFI mode:
 | 
			
		||||
https://sysguides.com/install-fedora-38-with-snapshot-and-rollback-support/
 | 
			
		||||
@@ -133,6 +133,13 @@ the other dependency not included in packages.txt is `pup` (included in a sectio
 | 
			
		||||
sudo dnf install -y $(cat ~/.dots/packages.txt)
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
** installing swayfx (window manager)
 | 
			
		||||
 | 
			
		||||
#+begin_src sh
 | 
			
		||||
sudo dnf copr enable swayfx/swayfx
 | 
			
		||||
sudo dnf install
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
** configuring sudoers
 | 
			
		||||
 | 
			
		||||
Allow wheel users to sudo with password and allow several system commands
 | 
			
		||||
@@ -169,15 +176,43 @@ sudo dnf install librewolf
 | 
			
		||||
*** plugins, etc
 | 
			
		||||
https://github.com/ranmaru22/firefox-vertical-tabs
 | 
			
		||||
https://addons.mozilla.org/en-US/firefox/addon/multi-account-containers/
 | 
			
		||||
https://addons.mozilla.org/en-US/firefox/addon/nicothin-dark-theme/
 | 
			
		||||
https://support.mozilla.org/en-US/kb/compact-mode-workaround-firefox
 | 
			
		||||
 | 
			
		||||
** doom emacs
 | 
			
		||||
 | 
			
		||||
first we need to install marked for markdown support
 | 
			
		||||
 | 
			
		||||
#+BEGIN_SRC sh
 | 
			
		||||
sudo npm install -g marked
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
then install emacs
 | 
			
		||||
#+begin_src sh
 | 
			
		||||
sudo dnf install emacs
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
alternatively build emacs with native compilation and pgtk for better compatibility with wayland
 | 
			
		||||
#+begin_src sh
 | 
			
		||||
 | 
			
		||||
## clone the emacs repository
 | 
			
		||||
git clone git://git.savannah.gnu.org/emacs.git
 | 
			
		||||
 | 
			
		||||
## install dependencies
 | 
			
		||||
sudo dnf install gcc atk-devel cairo-devel freetype-devel fontconfig-devel dbus-devel giflib-devel glibc-devel libgccjit-devel libpng-devel libjpeg-turbo-devel libjpeg-turbo libtiff-devel libX11-devel libXau-devel libXdmcp-devel libXrender-devel libXt-devel libXpm-devel ncurses-devel xorg-x11-proto-devel zlib-devel gnutls-devel librsvg2-devel m17n-lib-devel libotf-devel libselinux-devel alsa-lib-devel gpm-devel liblockfile-devel libxml2-devel autoconf bzip2 cairo texinfo gzip desktop-file-utils libacl-devel harfbuzz-devel jansson-devel systemd-devel lcms2-devel systemd-rpm-macros libtree-sitter-devel gtk3-devel webkit2gtk3-devel gnupg2 sysprof-devel
 | 
			
		||||
 | 
			
		||||
## build emacs 29.1
 | 
			
		||||
cd emacs
 | 
			
		||||
git checkout emacs-29.1
 | 
			
		||||
./autogen.sh
 | 
			
		||||
./configure --with-dbus --with-gif --with-jpeg --with-png --with-rsvg \
 | 
			
		||||
            --with-tiff --with-xft --with-xpm --with-gpm=no \
 | 
			
		||||
            --with-xwidgets --with-modules --with-harfbuzz --with-cairo --with-json \
 | 
			
		||||
            --with-tree-sitter --with-pgtk --with-native-compilation
 | 
			
		||||
make -j$(nproc)
 | 
			
		||||
sudo make install
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
install doom emacs:
 | 
			
		||||
#+BEGIN_SRC sh
 | 
			
		||||
git clone https://github.com/doomemacs/doomemacs ~/.emacs.d
 | 
			
		||||
~/.emacs.d/bin/doom install
 | 
			
		||||
@@ -246,11 +281,27 @@ pip install i3ipc
 | 
			
		||||
pip install autotiling==1.8
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
** sworkstyle (workspace icons)
 | 
			
		||||
 | 
			
		||||
installing this needs cargo, to install go here: [[*installing cargo]]
 | 
			
		||||
this also needs [[install icon fonts (Nerd Fonts)]]
 | 
			
		||||
#+begin_src sh
 | 
			
		||||
cargo install sworkstyle
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
** install icon fonts (Nerd Fonts)
 | 
			
		||||
 | 
			
		||||
#+begin_src sh
 | 
			
		||||
mkdir ~/.fonts
 | 
			
		||||
curl -LOv https://github.com/ryanoasis/nerd-fonts/releases/download/v3.1.1/NerdFontsSymbolsOnly.tar.xz --output-dir /tmp/
 | 
			
		||||
tar -xvf /tmp/NerdFontsSymbolsOnly.tar.xz -C ~/.fonts/
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
** sc-im (terminal spreadsheet)
 | 
			
		||||
 | 
			
		||||
from https://github.com/andmarti1424/sc-im/wiki/Installing-on-Fedora-27
 | 
			
		||||
#+BEGIN_SRC sh
 | 
			
		||||
sudo dnf install libzip-devel libxml2-devel ncurses-devel byacc git gcc gnuplot
 | 
			
		||||
sudo dnf install libzip libzip-devel libxml2-devel ncurses-devel byacc git gcc gnuplot
 | 
			
		||||
git clone https://github.com/andmarti1424/sc-im.git
 | 
			
		||||
cd sc-im/src/
 | 
			
		||||
make
 | 
			
		||||
@@ -287,7 +338,7 @@ pip install termdown
 | 
			
		||||
** go packages
 | 
			
		||||
*** pup
 | 
			
		||||
 | 
			
		||||
needed for rssadd RSS scanning to work, it's optional if you don't really need it.
 | 
			
		||||
needed for rssadd RSS scanning to work
 | 
			
		||||
 | 
			
		||||
#+BEGIN_SRC sh
 | 
			
		||||
go install github.com/ericchiang/pup@latest
 | 
			
		||||
@@ -359,9 +410,9 @@ mv Syncplay-*.AppImage ~/.local/bin/syncplay
 | 
			
		||||
** installing cargo
 | 
			
		||||
https://doc.rust-lang.org/cargo/getting-started/installation.html
 | 
			
		||||
 | 
			
		||||
when asked, choose to customize installation, and then choose `no` when it asks to modify PATH variable. (it's already set in ~~/config/shell/profile~)
 | 
			
		||||
#+BEGIN_SRC shell
 | 
			
		||||
curl https://sh.rustup.rs -sSf | sh
 | 
			
		||||
# choose to customize installation, and choose `no` when it asks to modify PATH variable.
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
** setting up flatpak
 | 
			
		||||
@@ -464,7 +515,49 @@ power_dpm_state: performance
 | 
			
		||||
power_dpm_force_performance_level: high
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
* todos
 | 
			
		||||
** TODO remove Virtual Box
 | 
			
		||||
** TODO remove autotiling
 | 
			
		||||
** TODO write dependencies and programs to separate files
 | 
			
		||||
** add packages
 | 
			
		||||
flatpak install --from https://flathub.org/repo/appstream/com.github.babluboy.bookworm.flatpakref
 | 
			
		||||
** add packages / other
 | 
			
		||||
*** installing bubblejail (WIP)
 | 
			
		||||
 | 
			
		||||
#+begin_src sh
 | 
			
		||||
git clone https://github.com/igo95862/bubblejail
 | 
			
		||||
cd bubblejail
 | 
			
		||||
git checkout tags/0.8.1
 | 
			
		||||
sudo dnf install scdoc
 | 
			
		||||
sudo dnf install python3
 | 
			
		||||
sudo dnf install python3-jinja2
 | 
			
		||||
sudo dnf install python3-tomli-w
 | 
			
		||||
sudo dnf install python3-tomli
 | 
			
		||||
sudo dnf install libseccomp
 | 
			
		||||
sudo dnf install python3-pyqt6
 | 
			
		||||
sudo dnf install python3-pyxdg
 | 
			
		||||
sudo dnf install bubblewrap
 | 
			
		||||
sudo dnf install xdg-dbus-proxy
 | 
			
		||||
meson setup build
 | 
			
		||||
cd build
 | 
			
		||||
meson compile
 | 
			
		||||
sudo meson install
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
**  setting up termux (WIP)
 | 
			
		||||
 | 
			
		||||
1. install termux-api and termux-styling from fdroid
 | 
			
		||||
2. install these packages
 | 
			
		||||
#+begin_src sh
 | 
			
		||||
pkg install termux-api fd-find ripgrep git emacs
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
3. install doom emacs
 | 
			
		||||
 | 
			
		||||
#+BEGIN_SRC sh
 | 
			
		||||
sudo npm install -g marked
 | 
			
		||||
git clone https://github.com/doomemacs/doomemacs ~/.emacs.d
 | 
			
		||||
~/.emacs.d/bin/doom install
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
** ryujinx (WIP)
 | 
			
		||||
sudo sysctl -w vm.max_map_count=524288
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										11
									
								
								packages.txt
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								packages.txt
									
									
									
									
									
								
							@@ -71,7 +71,6 @@ task-spooler
 | 
			
		||||
htop
 | 
			
		||||
waybar
 | 
			
		||||
dmenu
 | 
			
		||||
sway
 | 
			
		||||
swaylock
 | 
			
		||||
swaybg
 | 
			
		||||
swayidle
 | 
			
		||||
@@ -125,8 +124,6 @@ tmux
 | 
			
		||||
gamescope
 | 
			
		||||
dotnet
 | 
			
		||||
mono-devel
 | 
			
		||||
VirtualBox
 | 
			
		||||
virtualbox-guest-additions
 | 
			
		||||
@virtualization
 | 
			
		||||
texlive-scheme-full
 | 
			
		||||
texlive-dvipng
 | 
			
		||||
@@ -138,3 +135,11 @@ android-tools
 | 
			
		||||
java-1.8.0-openjdk
 | 
			
		||||
java-17-openjdk
 | 
			
		||||
easyeffects
 | 
			
		||||
java-latest-openjdk-devel
 | 
			
		||||
picard
 | 
			
		||||
chromaprint-tools
 | 
			
		||||
rhythmbox
 | 
			
		||||
python-sphinx
 | 
			
		||||
wofi
 | 
			
		||||
nautilus
 | 
			
		||||
mpg123
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user