Updated few things

This commit is contained in:
Clay Gomera 2022-07-05 16:57:42 -04:00
parent 986629c4ba
commit 2dd79ad8bf
13 changed files with 1216 additions and 86 deletions

View file

@ -0,0 +1,165 @@
## ____ __
## / __ \_________ _/ /_____
## / / / / ___/ __ `/ //_/ _ \
## / /_/ / / / /_/ / ,< / __/ Clay Gomera (Drake)
## /_____/_/ \__,_/_/|_|\___/ My custom castero config
##
[client]
restrict_memory_usage = False
delete_feed_confirmation = False
reload_feeds_threshold = 10
max_episodes = -1 # Set to -1 for no limit
retain_absent_episodes = False
default_layout = 1
disable_vertical_borders = False
clean_html_descriptions = True
refresh_delay = 30
player = mpv
execute_command =
proxy_http =
proxy_https =
add_only_unplayed_episodes = False
[feeds]
reload_on_start = True
[downloads]
custom_download_dir = $HOME/Downloads
request_timeout = 3
[colors]
# The foreground (text) color of the main interface.
color_foreground = yellow
# The background color of the main interface.
color_background = black
# The foreground (text) color of selected items.
color_foreground_alt = white
# The background color of selected items.
color_background_alt = black
# The foreground (text) color of marked items. Paired with color_background.
color_foreground_dim = green
# The foreground (text) color of status lines. Paired with color_background.
color_foreground_status = white
# The foreground (text) color of menu headings. Paired with color_background.
color_foreground_heading = yellow
# The foreground (text) color of dividers. Paired with color_background.
color_foreground_dividers = white
[playback]
seek_distance_forward = 30
seek_distance_backward = 10
default_playback_speed = 1.0
default_volume = 100
volume_adjust_distance = 5
resume_rewind_distance = 0
[keys]
# Show the help menu.
key_help = ?
# Exit the client
key_exit = q
# Add a feed.
key_add_feed = a
# Remove the selected feed.
key_remove = d
# Reload/refresh all feeds.
key_reload = r
# Reload/refresh the selected feed.
key_reload_selected = R
# Save episode for offline playback.
key_save = s
# Delete downloaded episodes.
key_delete = x
# Navigate up.
key_up = k
# Navigate right.
key_right = l
# Navigate down.
key_down = j
# Navigate left.
key_left = h
# Scroll menu up.
key_scroll_up = PPAGE
# Scroll menu down.
key_scroll_down = NPAGE
# Play selected feed/episode.
key_play_selected = ENTER
# Add selected feed/episode to queue.
key_add_selected = SPACE
# Clear the queue.
key_clear = c
# Clear progress from episode.
key_clear_progress = z
# Go to the next episode in the queue.
key_next = n
# Execute a command on the selected episode. See also execute_command.
key_execute = e
# Invert the order of the menu.
key_invert = i
# Filter the contents of the menu. Press again to clear the filter.
key_filter = /
# Mark the episode as played/unplayed.
key_mark_played = m
# Pause/play the current episode.
key_pause_play = p
# Alternate binding for key_pause_play -- make identical to disable.
key_pause_play_alt = k
# Seek forward.
key_seek_forward = L
# Alternate binding for key_seek_forward -- make identical to disable.
key_seek_forward_alt = RIGHT
# Seek backward.
key_seek_backward = H
# Alternate binding for key_seek_backward -- make identical to disable.
key_seek_backward_alt = LEFT
# Increase playback speed.
key_rate_increase = ]
# Decrease playback speed.
key_rate_decrease = [
# Increase volume.
key_volume_increase = =
# Decrease volume.
key_volume_decrease = -
# Show episode URL.
key_show_url = u

View file

@ -5,6 +5,9 @@
:desc "List bookmarks" "L" #'list-bookmarks
:desc "Save current bookmarks to bookmark file" "w" #'bookmark-save))
(global-auto-revert-mode 1)
(setq global-auto-revert-non-file-buffers t)
(evil-define-key 'normal ibuffer-mode-map
(kbd "f c") 'ibuffer-filter-by-content
(kbd "f d") 'ibuffer-filter-by-directory
@ -212,7 +215,7 @@ List of keybindings (SPC h b b)")
(emms-default-players)
(emms-mode-line 1)
(emms-playing-time 1)
(setq emms-source-file-default-directory "/run/media/Storage/multimedia/music"
(setq emms-source-file-default-directory "~/Music/"
emms-playlist-buffer-name "*Music*"
emms-info-asynchronously t
emms-source-file-directory-tree-function 'emms-source-file-directory-tree-find)
@ -227,6 +230,23 @@ List of keybindings (SPC h b b)")
(use-package emojify
:hook (after-init . global-emojify-mode))
(map! :leader
(:prefix ("e". "evaluate/ERC/EWW")
:desc "Launch ERC with TLS connection" "E" #'erc-tls))
(setq erc-prompt (lambda () (concat "[" (buffer-name) "]"))
erc-server "irc.libera.chat"
erc-nick "distrotube"
erc-user-full-name "Derek Taylor"
erc-track-shorten-start 24
erc-autojoin-channels-alist '(("irc.libera.chat" "#archlinux" "#linux" "#emacs"))
erc-kill-buffer-on-part t
erc-fill-column 100
erc-fill-function 'erc-fill-static
erc-fill-static-center 20
;; erc-auto-query 'bury
)
(map! :leader
(:prefix ("e". "evaluate/EWW")
:desc "Evaluate elisp in buffer" "b" #'eval-buffer
@ -244,7 +264,7 @@ List of keybindings (SPC h b b)")
:desc "Eww reload page" "R" #'eww-reload))
(setq doom-font (font-spec :family "mononoki Nerd Font" :size 15)
doom-variable-pitch-font (font-spec :family "Ubuntu" :size 15)
doom-variable-pitch-font (font-spec :family "mononoki Nerd Font" :size 15)
doom-big-font (font-spec :family "mononoki Nerd Font" :size 20))
(after! doom-themes
(setq doom-themes-enable-bold t
@ -304,12 +324,21 @@ List of keybindings (SPC h b b)")
:desc "Toggle line highlight globally" "H" #'global-hl-line-mode
:desc "Toggle truncate lines" "t" #'toggle-truncate-lines))
(custom-set-faces
'(markdown-header-face ((t (:inherit font-lock-function-name-face :weight bold :family "variable-pitch"))))
'(markdown-header-face-1 ((t (:inherit markdown-header-face :height 1.7))))
'(markdown-header-face-2 ((t (:inherit markdown-header-face :height 1.6))))
'(markdown-header-face-3 ((t (:inherit markdown-header-face :height 1.5))))
'(markdown-header-face-4 ((t (:inherit markdown-header-face :height 1.4))))
'(markdown-header-face-5 ((t (:inherit markdown-header-face :height 1.3))))
'(markdown-header-face-6 ((t (:inherit markdown-header-face :height 1.2)))))
(setq minimap-window-location 'right)
(map! :leader
(:prefix ("t" . "toggle")
:desc "Toggle minimap-mode" "m" #'minimap-mode))
(set-face-attribute 'mode-line nil :font "Ubuntu Mono-13")
(set-face-attribute 'mode-line nil :font "mononoki Nerd Font-13")
(setq doom-modeline-height 30 ;; sets modeline height
doom-modeline-bar-width 5 ;; sets right bar width
doom-modeline-persp-name t ;; adds perspective name to modeline
@ -367,13 +396,168 @@ List of keybindings (SPC h b b)")
"DONE(d)" ; Task has been completed
"CANCELLED(c)" )))) ; Task has been cancelled
(custom-set-faces
'(org-level-1 ((t (:inherit outline-1 :height 1.4))))
'(org-level-2 ((t (:inherit outline-2 :height 1.3))))
'(org-level-3 ((t (:inherit outline-3 :height 1.2))))
'(org-level-4 ((t (:inherit outline-4 :height 1.1))))
'(org-level-5 ((t (:inherit outline-5 :height 1.0))))
)
(defun dt/org-colors-doom-one ()
"Enable Doom One colors for Org headers."
(interactive)
(dolist
(face
'((org-level-1 1.7 "#51afef" ultra-bold)
(org-level-2 1.6 "#c678dd" extra-bold)
(org-level-3 1.5 "#98be65" bold)
(org-level-4 1.4 "#da8548" semi-bold)
(org-level-5 1.3 "#5699af" normal)
(org-level-6 1.2 "#a9a1e1" normal)
(org-level-7 1.1 "#46d9ff" normal)
(org-level-8 1.0 "#ff6c6b" normal)))
(set-face-attribute (nth 0 face) nil :font doom-variable-pitch-font :weight (nth 3 face) :height (nth 1 face) :foreground (nth 2 face)))
(set-face-attribute 'org-table nil :font doom-font :weight 'normal :height 1.0 :foreground "#bfafdf"))
(defun dt/org-colors-dracula ()
"Enable Dracula colors for Org headers."
(interactive)
(dolist
(face
'((org-level-1 1.7 "#8be9fd" ultra-bold)
(org-level-2 1.6 "#bd93f9" extra-bold)
(org-level-3 1.5 "#50fa7b" bold)
(org-level-4 1.4 "#ff79c6" semi-bold)
(org-level-5 1.3 "#9aedfe" normal)
(org-level-6 1.2 "#caa9fa" normal)
(org-level-7 1.1 "#5af78e" normal)
(org-level-8 1.0 "#ff92d0" normal)))
(set-face-attribute (nth 0 face) nil :font doom-variable-pitch-font :weight (nth 3 face) :height (nth 1 face) :foreground (nth 2 face)))
(set-face-attribute 'org-table nil :font doom-font :weight 'normal :height 1.0 :foreground "#bfafdf"))
(defun dt/org-colors-gruvbox-dark ()
"Enable Gruvbox Dark colors for Org headers."
(interactive)
(dolist
(face
'((org-level-1 1.7 "#458588" ultra-bold)
(org-level-2 1.6 "#b16286" extra-bold)
(org-level-3 1.5 "#98971a" bold)
(org-level-4 1.4 "#fb4934" semi-bold)
(org-level-5 1.3 "#83a598" normal)
(org-level-6 1.2 "#d3869b" normal)
(org-level-7 1.1 "#d79921" normal)
(org-level-8 1.0 "#8ec07c" normal)))
(set-face-attribute (nth 0 face) nil :font doom-variable-pitch-font :weight (nth 3 face) :height (nth 1 face) :foreground (nth 2 face)))
(set-face-attribute 'org-table nil :font doom-font :weight 'normal :height 1.0 :foreground "#bfafdf"))
(defun dt/org-colors-monokai-pro ()
"Enable Monokai Pro colors for Org headers."
(interactive)
(dolist
(face
'((org-level-1 1.7 "#78dce8" ultra-bold)
(org-level-2 1.6 "#ab9df2" extra-bold)
(org-level-3 1.5 "#a9dc76" bold)
(org-level-4 1.4 "#fc9867" semi-bold)
(org-level-5 1.3 "#ff6188" normal)
(org-level-6 1.2 "#ffd866" normal)
(org-level-7 1.1 "#78dce8" normal)
(org-level-8 1.0 "#ab9df2" normal)))
(set-face-attribute (nth 0 face) nil :font doom-variable-pitch-font :weight (nth 3 face) :height (nth 1 face) :foreground (nth 2 face)))
(set-face-attribute 'org-table nil :font doom-font :weight 'normal :height 1.0 :foreground "#bfafdf"))
(defun dt/org-colors-nord ()
"Enable Nord colors for Org headers."
(interactive)
(dolist
(face
'((org-level-1 1.7 "#81a1c1" ultra-bold)
(org-level-2 1.6 "#b48ead" extra-bold)
(org-level-3 1.5 "#a3be8c" bold)
(org-level-4 1.4 "#ebcb8b" semi-bold)
(org-level-5 1.3 "#bf616a" normal)
(org-level-6 1.2 "#88c0d0" normal)
(org-level-7 1.1 "#81a1c1" normal)
(org-level-8 1.0 "#b48ead" normal)))
(set-face-attribute (nth 0 face) nil :font doom-variable-pitch-font :weight (nth 3 face) :height (nth 1 face) :foreground (nth 2 face)))
(set-face-attribute 'org-table nil :font doom-font :weight 'normal :height 1.0 :foreground "#bfafdf"))
(defun dt/org-colors-oceanic-next ()
"Enable Oceanic Next colors for Org headers."
(interactive)
(dolist
(face
'((org-level-1 1.7 "#6699cc" ultra-bold)
(org-level-2 1.6 "#c594c5" extra-bold)
(org-level-3 1.5 "#99c794" bold)
(org-level-4 1.4 "#fac863" semi-bold)
(org-level-5 1.3 "#5fb3b3" normal)
(org-level-6 1.2 "#ec5f67" normal)
(org-level-7 1.1 "#6699cc" normal)
(org-level-8 1.0 "#c594c5" normal)))
(set-face-attribute (nth 0 face) nil :font doom-variable-pitch-font :weight (nth 3 face) :height (nth 1 face) :foreground (nth 2 face)))
(set-face-attribute 'org-table nil :font doom-font :weight 'normal :height 1.0 :foreground "#bfafdf"))
(defun dt/org-colors-palenight ()
"Enable Palenight colors for Org headers."
(interactive)
(dolist
(face
'((org-level-1 1.7 "#82aaff" ultra-bold)
(org-level-2 1.6 "#c792ea" extra-bold)
(org-level-3 1.5 "#c3e88d" bold)
(org-level-4 1.4 "#ffcb6b" semi-bold)
(org-level-5 1.3 "#a3f7ff" normal)
(org-level-6 1.2 "#e1acff" normal)
(org-level-7 1.1 "#f07178" normal)
(org-level-8 1.0 "#ddffa7" normal)))
(set-face-attribute (nth 0 face) nil :font doom-variable-pitch-font :weight (nth 3 face) :height (nth 1 face) :foreground (nth 2 face)))
(set-face-attribute 'org-table nil :font doom-font :weight 'normal :height 1.0 :foreground "#bfafdf"))
(defun dt/org-colors-solarized-dark ()
"Enable Solarized Dark colors for Org headers."
(interactive)
(dolist
(face
'((org-level-1 1.7 "#268bd2" ultra-bold)
(org-level-2 1.6 "#d33682" extra-bold)
(org-level-3 1.5 "#859900" bold)
(org-level-4 1.4 "#b58900" semi-bold)
(org-level-5 1.3 "#cb4b16" normal)
(org-level-6 1.2 "#6c71c4" normal)
(org-level-7 1.1 "#2aa198" normal)
(org-level-8 1.0 "#657b83" normal)))
(set-face-attribute (nth 0 face) nil :font doom-variable-pitch-font :weight (nth 3 face) :height (nth 1 face) :foreground (nth 2 face)))
(set-face-attribute 'org-table nil :font doom-font :weight 'normal :height 1.0 :foreground "#bfafdf"))
(defun dt/org-colors-solarized-light ()
"Enable Solarized Light colors for Org headers."
(interactive)
(dolist
(face
'((org-level-1 1.7 "#268bd2" ultra-bold)
(org-level-2 1.6 "#d33682" extra-bold)
(org-level-3 1.5 "#859900" bold)
(org-level-4 1.4 "#b58900" semi-bold)
(org-level-5 1.3 "#cb4b16" normal)
(org-level-6 1.2 "#6c71c4" normal)
(org-level-7 1.1 "#2aa198" normal)
(org-level-8 1.0 "#657b83" normal)))
(set-face-attribute (nth 0 face) nil :font doom-variable-pitch-font :weight (nth 3 face) :height (nth 1 face) :foreground (nth 2 face)))
(set-face-attribute 'org-table nil :font doom-font :weight 'normal :height 1.0 :foreground "#bfafdf"))
(defun dt/org-colors-tomorrow-night ()
"Enable Tomorrow Night colors for Org headers."
(interactive)
(dolist
(face
'((org-level-1 1.7 "#81a2be" ultra-bold)
(org-level-2 1.6 "#b294bb" extra-bold)
(org-level-3 1.5 "#b5bd68" bold)
(org-level-4 1.4 "#e6c547" semi-bold)
(org-level-5 1.3 "#cc6666" normal)
(org-level-6 1.2 "#70c0ba" normal)
(org-level-7 1.1 "#b77ee0" normal)
(org-level-8 1.0 "#9ec400" normal)))
(set-face-attribute (nth 0 face) nil :font doom-variable-pitch-font :weight (nth 3 face) :height (nth 1 face) :foreground (nth 2 face)))
(set-face-attribute 'org-table nil :font doom-font :weight 'normal :height 1.0 :foreground "#bfafdf"))
;; Load our desired dt/org-colors-* theme on startup
(dt/org-colors-gruvbox-dark)
(use-package ox-man)
(use-package ox-gemini)
@ -386,27 +570,12 @@ List of keybindings (SPC h b b)")
(setq org-publish-use-timestamps-flag nil)
(setq org-export-with-broken-links t)
(setq org-publish-project-alist
'(("distro.tube"
:base-directory "~/nc/gitlab-repos/distro.tube/"
:base-extension "org"
:publishing-directory "~/nc/gitlab-repos/distro.tube/html/"
:recursive t
:exclude "org-html-themes/.*"
:publishing-function org-html-publish-to-html
:headline-levels 4 ; Just the default for this project.
:auto-preamble t)
("org-static"
:base-directory "~/Org/website"
:base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf"
:publishing-directory "~/public_html/"
:recursive t
:exclude ".*/org-html-themes/.*"
:publishing-function org-publish-attachment)
))
(after! org-roam
(setq org-roam-directory "~/nc/Roam"))
(use-package! org-auto-tangle
:defer t
:hook (org-mode . org-auto-tangle-mode)
:config
(setq org-auto-tangle-default t))
(use-package! password-store)

View file

@ -10,6 +10,7 @@
- [[#bookmarks-and-buffers][BOOKMARKS AND BUFFERS]]
- [[#bookmarks][Bookmarks]]
- [[#buffers][Buffers]]
- [[#global-auto-revert][Global Auto Revert]]
- [[#keybindings-within-ibuffer-mode][Keybindings within ibuffer mode]]
- [[#calendar][CALENDAR]]
- [[#centaur-tabs][CENTAUR-TABS]]
@ -26,6 +27,7 @@
- [[#elfeed][ELFEED]]
- [[#emms][EMMS]]
- [[#emojis][EMOJIS]]
- [[#erc][ERC]]
- [[#evaluate-elisp-expressions][EVALUATE ELISP EXPRESSIONS]]
- [[#eww][EWW]]
- [[#fonts][FONTS]]
@ -34,17 +36,18 @@
- [[#ivy-posframe][IVY-POSFRAME]]
- [[#ivy-keybindings][IVY KEYBINDINGS]]
- [[#line-settings][LINE SETTINGS]]
- [[#markdown][MARKDOWN]]
- [[#minimap][MINIMAP]]
- [[#modeline][MODELINE]]
- [[#mouse-support][MOUSE SUPPORT]]
- [[#neotree][NEOTREE]]
- [[#open-specific-files][OPEN SPECIFIC FILES]]
- [[#org-mode][ORG MODE]]
- [[#set-font-sizes-for-each-header-level-in-org][Set font sizes for each header level in Org]]
- [[#org-fonts][Org fonts]]
- [[#org-export][Org-export]]
- [[#org-journal][Org-journal]]
- [[#org-publish][Org-publish]]
- [[#org-roam][Org-roam]]
- [[#org-auto-tangle][Org-auto-tangle]]
- [[#password-store][PASSWORD STORE]]
- [[#perspective][PERSPECTIVE]]
- [[#rainbow-mode][RAINBOW MODE]]
@ -88,6 +91,14 @@ Regarding /buffers/, the text you are editing in Emacs resides in an object call
| previous-buffer | Goto previous buffer | SPC b p |
| save-buffer | Save current buffer | SPC b s |
** Global Auto Revert
A buffer can get out of sync with respect to its visited file on disk if that file is changed by another program. To keep it up to date, you can enable Auto Revert mode by typing M-x auto-revert-mode, or you can set it to be turned on globally with 'global-auto-revert-mode'. I have also turned on Global Auto Revert on non-file buffers, which is especially useful for 'dired' buffers.
#+begin_src emacs-lisp
(global-auto-revert-mode 1)
(setq global-auto-revert-non-file-buffers t)
#+end_src
** Keybindings within ibuffer mode
| COMMAND | DESCRIPTION | KEYBINDING |
|-----------------------------------+----------------------------------------+------------|
@ -230,7 +241,6 @@ Gives us a popup box with "Clippy, the paper clip". You can make him say various
(:prefix ("c h" . "Help info from Clippy")
:desc "Clippy describes function under point" "f" #'clippy-describe-function
:desc "Clippy describes variable under point" "v" #'clippy-describe-variable))
#+end_src
* DASHBOARD
@ -444,7 +454,7 @@ One of the media players available for Emacs is emms, which stands for Emacs Mul
(emms-default-players)
(emms-mode-line 1)
(emms-playing-time 1)
(setq emms-source-file-default-directory "/run/media/Storage/multimedia/music"
(setq emms-source-file-default-directory "~/Music/"
emms-playlist-buffer-name "*Music*"
emms-info-asynchronously t
emms-source-file-directory-tree-function 'emms-source-file-directory-tree-find)
@ -465,6 +475,32 @@ Emojify is an Emacs extension to display emojis. It can display github style emo
:hook (after-init . global-emojify-mode))
#+end_src
* ERC
ERC is a built-in Emacs IRC client.
| COMMAND | DESCRIPTION | KEYBINDING |
|---------+---------------------------------------------+------------|
| erc-tls | /Launch ERC using more secure TLS connection/ | SPC e E |
#+begin_src emacs-lisp
(map! :leader
(:prefix ("e". "evaluate/ERC/EWW")
:desc "Launch ERC with TLS connection" "E" #'erc-tls))
(setq erc-prompt (lambda () (concat "[" (buffer-name) "]"))
erc-server "irc.libera.chat"
erc-nick "distrotube"
erc-user-full-name "Derek Taylor"
erc-track-shorten-start 24
erc-autojoin-channels-alist '(("irc.libera.chat" "#archlinux" "#linux" "#emacs"))
erc-kill-buffer-on-part t
erc-fill-column 100
erc-fill-function 'erc-fill-static
erc-fill-static-center 20
;; erc-auto-query 'bury
)
#+end_src
* EVALUATE ELISP EXPRESSIONS
Changing some keybindings from their defaults to better fit with Doom Emacs, and to avoid conflicts with my window managers which sometimes use the control key in their keybindings. By default, Doom Emacs does not use 'SPC e' for anything, so I choose to use the format 'SPC e' plus 'key' for these (I also use 'SPC e' for 'eww' keybindings).
@ -509,7 +545,7 @@ Settings related to fonts within Doom Emacs:
#+BEGIN_SRC emacs-lisp
(setq doom-font (font-spec :family "mononoki Nerd Font" :size 15)
doom-variable-pitch-font (font-spec :family "Ubuntu" :size 15)
doom-variable-pitch-font (font-spec :family "mononoki Nerd Font" :size 15)
doom-big-font (font-spec :family "mononoki Nerd Font" :size 20))
(after! doom-themes
(setq doom-themes-enable-bold t
@ -621,6 +657,19 @@ I set comment-line to 'SPC TAB TAB' which is a rather comfortable keybinding for
:desc "Toggle truncate lines" "t" #'toggle-truncate-lines))
#+END_SRC
* MARKDOWN
#+begin_src emacs-lisp
(custom-set-faces
'(markdown-header-face ((t (:inherit font-lock-function-name-face :weight bold :family "variable-pitch"))))
'(markdown-header-face-1 ((t (:inherit markdown-header-face :height 1.7))))
'(markdown-header-face-2 ((t (:inherit markdown-header-face :height 1.6))))
'(markdown-header-face-3 ((t (:inherit markdown-header-face :height 1.5))))
'(markdown-header-face-4 ((t (:inherit markdown-header-face :height 1.4))))
'(markdown-header-face-5 ((t (:inherit markdown-header-face :height 1.3))))
'(markdown-header-face-6 ((t (:inherit markdown-header-face :height 1.2)))))
#+end_src
* MINIMAP
A minimap sidebar displaying a smaller version of the current buffer on either the left or right side. It highlights the currently shown region and updates its position automatically. Be aware that this minimap program does not work in Org documents. This is not unusual though because I have tried several minimap programs and none of them can handle Org.
@ -640,7 +689,7 @@ The modeline is the bottom status bar that appears in Emacs windows. For more i
https://github.com/seagle0128/doom-modeline
#+begin_src emacs-lisp
(set-face-attribute 'mode-line nil :font "Ubuntu Mono-13")
(set-face-attribute 'mode-line nil :font "mononoki Nerd Font-13")
(setq doom-modeline-height 30 ;; sets modeline height
doom-modeline-bar-width 5 ;; sets right bar width
doom-modeline-persp-name t ;; adds perspective name to modeline
@ -735,21 +784,177 @@ I wrapped most of this block in (after! org). Without this, my settings might b
"CANCELLED(c)" )))) ; Task has been cancelled
#+END_SRC
** Set font sizes for each header level in Org
You can set the Org heading levels to be different font sizes. So I choose to have level 1 headings to be 140% in height, level 2 to be 130%, etc. Other interesting things you could play with include adding :foreground color and/or :background color if you want to override the theme colors.
** Org fonts
I have created an interactive function for each color scheme (M-x dt/org-colors-*). These functions will set appropriate colors and font attributes for org-level fonts and the org-table font.
#+begin_src emacs-lisp
(custom-set-faces
'(org-level-1 ((t (:inherit outline-1 :height 1.4))))
'(org-level-2 ((t (:inherit outline-2 :height 1.3))))
'(org-level-3 ((t (:inherit outline-3 :height 1.2))))
'(org-level-4 ((t (:inherit outline-4 :height 1.1))))
'(org-level-5 ((t (:inherit outline-5 :height 1.0))))
)
(defun dt/org-colors-doom-one ()
"Enable Doom One colors for Org headers."
(interactive)
(dolist
(face
'((org-level-1 1.7 "#51afef" ultra-bold)
(org-level-2 1.6 "#c678dd" extra-bold)
(org-level-3 1.5 "#98be65" bold)
(org-level-4 1.4 "#da8548" semi-bold)
(org-level-5 1.3 "#5699af" normal)
(org-level-6 1.2 "#a9a1e1" normal)
(org-level-7 1.1 "#46d9ff" normal)
(org-level-8 1.0 "#ff6c6b" normal)))
(set-face-attribute (nth 0 face) nil :font doom-variable-pitch-font :weight (nth 3 face) :height (nth 1 face) :foreground (nth 2 face)))
(set-face-attribute 'org-table nil :font doom-font :weight 'normal :height 1.0 :foreground "#bfafdf"))
(defun dt/org-colors-dracula ()
"Enable Dracula colors for Org headers."
(interactive)
(dolist
(face
'((org-level-1 1.7 "#8be9fd" ultra-bold)
(org-level-2 1.6 "#bd93f9" extra-bold)
(org-level-3 1.5 "#50fa7b" bold)
(org-level-4 1.4 "#ff79c6" semi-bold)
(org-level-5 1.3 "#9aedfe" normal)
(org-level-6 1.2 "#caa9fa" normal)
(org-level-7 1.1 "#5af78e" normal)
(org-level-8 1.0 "#ff92d0" normal)))
(set-face-attribute (nth 0 face) nil :font doom-variable-pitch-font :weight (nth 3 face) :height (nth 1 face) :foreground (nth 2 face)))
(set-face-attribute 'org-table nil :font doom-font :weight 'normal :height 1.0 :foreground "#bfafdf"))
(defun dt/org-colors-gruvbox-dark ()
"Enable Gruvbox Dark colors for Org headers."
(interactive)
(dolist
(face
'((org-level-1 1.7 "#458588" ultra-bold)
(org-level-2 1.6 "#b16286" extra-bold)
(org-level-3 1.5 "#98971a" bold)
(org-level-4 1.4 "#fb4934" semi-bold)
(org-level-5 1.3 "#83a598" normal)
(org-level-6 1.2 "#d3869b" normal)
(org-level-7 1.1 "#d79921" normal)
(org-level-8 1.0 "#8ec07c" normal)))
(set-face-attribute (nth 0 face) nil :font doom-variable-pitch-font :weight (nth 3 face) :height (nth 1 face) :foreground (nth 2 face)))
(set-face-attribute 'org-table nil :font doom-font :weight 'normal :height 1.0 :foreground "#bfafdf"))
(defun dt/org-colors-monokai-pro ()
"Enable Monokai Pro colors for Org headers."
(interactive)
(dolist
(face
'((org-level-1 1.7 "#78dce8" ultra-bold)
(org-level-2 1.6 "#ab9df2" extra-bold)
(org-level-3 1.5 "#a9dc76" bold)
(org-level-4 1.4 "#fc9867" semi-bold)
(org-level-5 1.3 "#ff6188" normal)
(org-level-6 1.2 "#ffd866" normal)
(org-level-7 1.1 "#78dce8" normal)
(org-level-8 1.0 "#ab9df2" normal)))
(set-face-attribute (nth 0 face) nil :font doom-variable-pitch-font :weight (nth 3 face) :height (nth 1 face) :foreground (nth 2 face)))
(set-face-attribute 'org-table nil :font doom-font :weight 'normal :height 1.0 :foreground "#bfafdf"))
(defun dt/org-colors-nord ()
"Enable Nord colors for Org headers."
(interactive)
(dolist
(face
'((org-level-1 1.7 "#81a1c1" ultra-bold)
(org-level-2 1.6 "#b48ead" extra-bold)
(org-level-3 1.5 "#a3be8c" bold)
(org-level-4 1.4 "#ebcb8b" semi-bold)
(org-level-5 1.3 "#bf616a" normal)
(org-level-6 1.2 "#88c0d0" normal)
(org-level-7 1.1 "#81a1c1" normal)
(org-level-8 1.0 "#b48ead" normal)))
(set-face-attribute (nth 0 face) nil :font doom-variable-pitch-font :weight (nth 3 face) :height (nth 1 face) :foreground (nth 2 face)))
(set-face-attribute 'org-table nil :font doom-font :weight 'normal :height 1.0 :foreground "#bfafdf"))
(defun dt/org-colors-oceanic-next ()
"Enable Oceanic Next colors for Org headers."
(interactive)
(dolist
(face
'((org-level-1 1.7 "#6699cc" ultra-bold)
(org-level-2 1.6 "#c594c5" extra-bold)
(org-level-3 1.5 "#99c794" bold)
(org-level-4 1.4 "#fac863" semi-bold)
(org-level-5 1.3 "#5fb3b3" normal)
(org-level-6 1.2 "#ec5f67" normal)
(org-level-7 1.1 "#6699cc" normal)
(org-level-8 1.0 "#c594c5" normal)))
(set-face-attribute (nth 0 face) nil :font doom-variable-pitch-font :weight (nth 3 face) :height (nth 1 face) :foreground (nth 2 face)))
(set-face-attribute 'org-table nil :font doom-font :weight 'normal :height 1.0 :foreground "#bfafdf"))
(defun dt/org-colors-palenight ()
"Enable Palenight colors for Org headers."
(interactive)
(dolist
(face
'((org-level-1 1.7 "#82aaff" ultra-bold)
(org-level-2 1.6 "#c792ea" extra-bold)
(org-level-3 1.5 "#c3e88d" bold)
(org-level-4 1.4 "#ffcb6b" semi-bold)
(org-level-5 1.3 "#a3f7ff" normal)
(org-level-6 1.2 "#e1acff" normal)
(org-level-7 1.1 "#f07178" normal)
(org-level-8 1.0 "#ddffa7" normal)))
(set-face-attribute (nth 0 face) nil :font doom-variable-pitch-font :weight (nth 3 face) :height (nth 1 face) :foreground (nth 2 face)))
(set-face-attribute 'org-table nil :font doom-font :weight 'normal :height 1.0 :foreground "#bfafdf"))
(defun dt/org-colors-solarized-dark ()
"Enable Solarized Dark colors for Org headers."
(interactive)
(dolist
(face
'((org-level-1 1.7 "#268bd2" ultra-bold)
(org-level-2 1.6 "#d33682" extra-bold)
(org-level-3 1.5 "#859900" bold)
(org-level-4 1.4 "#b58900" semi-bold)
(org-level-5 1.3 "#cb4b16" normal)
(org-level-6 1.2 "#6c71c4" normal)
(org-level-7 1.1 "#2aa198" normal)
(org-level-8 1.0 "#657b83" normal)))
(set-face-attribute (nth 0 face) nil :font doom-variable-pitch-font :weight (nth 3 face) :height (nth 1 face) :foreground (nth 2 face)))
(set-face-attribute 'org-table nil :font doom-font :weight 'normal :height 1.0 :foreground "#bfafdf"))
(defun dt/org-colors-solarized-light ()
"Enable Solarized Light colors for Org headers."
(interactive)
(dolist
(face
'((org-level-1 1.7 "#268bd2" ultra-bold)
(org-level-2 1.6 "#d33682" extra-bold)
(org-level-3 1.5 "#859900" bold)
(org-level-4 1.4 "#b58900" semi-bold)
(org-level-5 1.3 "#cb4b16" normal)
(org-level-6 1.2 "#6c71c4" normal)
(org-level-7 1.1 "#2aa198" normal)
(org-level-8 1.0 "#657b83" normal)))
(set-face-attribute (nth 0 face) nil :font doom-variable-pitch-font :weight (nth 3 face) :height (nth 1 face) :foreground (nth 2 face)))
(set-face-attribute 'org-table nil :font doom-font :weight 'normal :height 1.0 :foreground "#bfafdf"))
(defun dt/org-colors-tomorrow-night ()
"Enable Tomorrow Night colors for Org headers."
(interactive)
(dolist
(face
'((org-level-1 1.7 "#81a2be" ultra-bold)
(org-level-2 1.6 "#b294bb" extra-bold)
(org-level-3 1.5 "#b5bd68" bold)
(org-level-4 1.4 "#e6c547" semi-bold)
(org-level-5 1.3 "#cc6666" normal)
(org-level-6 1.2 "#70c0ba" normal)
(org-level-7 1.1 "#b77ee0" normal)
(org-level-8 1.0 "#9ec400" normal)))
(set-face-attribute (nth 0 face) nil :font doom-variable-pitch-font :weight (nth 3 face) :height (nth 1 face) :foreground (nth 2 face)))
(set-face-attribute 'org-table nil :font doom-font :weight 'normal :height 1.0 :foreground "#bfafdf"))
;; Load our desired dt/org-colors-* theme on startup
(dt/org-colors-gruvbox-dark)
#+end_src
** Org-export
We need ox-man for "Org eXporting" to manpage format and ox-gemini for exporting to gemtext (for the gemini protocol).
=NOTE:= I also enable ox-publish for converting an Org site into an HTML site, but that is done in init.el (org +publish).
#+BEGIN_SRC emacs-lisp
@ -770,39 +975,18 @@ We need ox-man for "Org eXporting" to manpage format and ox-gemini for exporting
#+begin_src emacs-lisp
(setq org-publish-use-timestamps-flag nil)
(setq org-export-with-broken-links t)
(setq org-publish-project-alist
'(("distro.tube"
:base-directory "~/nc/gitlab-repos/distro.tube/"
:base-extension "org"
:publishing-directory "~/nc/gitlab-repos/distro.tube/html/"
:recursive t
:exclude "org-html-themes/.*"
:publishing-function org-html-publish-to-html
:headline-levels 4 ; Just the default for this project.
:auto-preamble t)
("org-static"
:base-directory "~/Org/website"
:base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf"
:publishing-directory "~/public_html/"
:recursive t
:exclude ".*/org-html-themes/.*"
:publishing-function org-publish-attachment)
))
#+end_src
** Org-roam
| COMMAND | DESCRIPTION | KEYBINDING |
|---------------------------------+---------------------------------+-------------|
| org-roam-find-file | org roam find file | SPC n r f |
| org-roam-insert | org roam insert | SPC n r i |
| org-roam-dailies-find-date | org roam dailies find date | SPC n r d d |
| org-roam-dailies-find-today | org roam dailies find today | SPC n r d t |
| org-roam-dailies-find-tomorrow | org roam dailies find tomorrow | SPC n r d m |
| org-roam-dailies-find-yesterday | org roam dailies find yesterday | SPC n r d y |
** Org-auto-tangle
=org-auto-tangle= allows you to add the option =#+auto_tangle: t= in your Org file so that it automatically tangles when you save the document.
#+begin_src emacs-lisp
(after! org-roam
(setq org-roam-directory "~/nc/Roam"))
(use-package! org-auto-tangle
:defer t
:hook (org-mode . org-auto-tangle-mode)
:config
(setq org-auto-tangle-default t))
#+end_src
* PASSWORD STORE

View file

@ -42,8 +42,8 @@
neotree ; a project drawer, like NERDTree for vim
ophints ; highlight the region an operation acts on
(popup +defaults) ; tame sudden yet inevitable temporary windows
;; tabs ; a tab bar for Emacs
;; ;;treemacs ; a project drawer, like neotree but cooler
tabs ; a tab bar for Emacs
;;treemacs ; a project drawer, like neotree but cooler
unicode ; extended unicode support for various languages
vc-gutter ; vcs diff in the fringe
vi-tilde-fringe ; fringe tildes to mark beyond EOB
@ -116,7 +116,7 @@
common-lisp ; if you've seen one lisp, you've seen them all
;;coq ; proofs-as-programs
;;crystal ; ruby at the speed of c
csharp ; unity, .NET, and mono shenanigans
;;csharp ; unity, .NET, and mono shenanigans
;;data ; config/data formats
;;(dart +flutter) ; paint ui and not much else
;;elixir ; erlang done right
@ -128,8 +128,8 @@
;;fsharp ; ML stands for Microsoft's Language
;;fstar ; (dependent) types and (monadic) effects and Z3
;;gdscript ; the language you waited for
(go +lsp) ; the hipster dialect
(haskell +dante) ; a language that's lazier than I am
;;(go +lsp) ; the hipster dialect
;;(haskell +dante) ; a language that's lazier than I am
;;hy ; readability of scheme w/ speed of python
;;idris ; a language you can depend on
json ; At least it ain't XML
@ -162,12 +162,12 @@
;;rst ; ReST in peace
;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"}
rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
scala ; java, but good
;;scala ; java, but good
scheme ; a fully conniving family of lisps
sh ; she sells {ba,z,fi}sh shells on the C xor
;;sml
;;solidity ; do you need a blockchain? No.
swift ; who asked for emoji variables?
;;swift ; who asked for emoji variables?
;;terra ; Earth and Moon in alignment for performance.
web ; the tubes
yaml ; JSON, but readable

View file

@ -72,6 +72,7 @@
(package! mw-thesaurus)
(package! org-board)
(package! org-web-tools)
(package! org-auto-tangle)
(package! ox-gemini)
(package! pacmacs)
(package! peep-dired)
@ -85,3 +86,4 @@
(package! beacon)
(package! clippy)
(package! minimap)
(package! olivetti)

View file

@ -1,3 +1,10 @@
## ____ __
## / __ \_________ _/ /_____
## / / / / ___/ __ `/ //_/ _ \
## / /_/ / / / /_/ / ,< / __/ Clay Gomera (Drake)
## /_____/_/ \__,_/_/|_|\___/ My custom mpv config
##
l seek 5
h seek -5
j seek -60

View file

@ -1,3 +1,9 @@
## ____ __
## / __ \_________ _/ /_____
## / / / / ___/ __ `/ //_/ _ \
## / /_/ / / / /_/ / ,< / __/ Clay Gomera (Drake)
## /_____/_/ \__,_/_/|_|\___/ My custom newsboat config
##
#show-read-feeds no
auto-reload yes

View file

@ -7,3 +7,21 @@ https://based.cooking/rss.xml "Based Cooking"
https://artixlinux.org/feed.php "Artix Linux"
https://www.archlinux.org/feeds/news/ "Arch Linux"
https://switchedtolinux.com/rss "Switched to Linux"
https://www.reddit.com/r/linux.rss "Reddit linux"
https://www.reddit.com/r/commandline.rss "Reddit Commandline"
https://www.reddit.com/r/distrotube.rss "Reddit Distrotube"
https://www.reddit.com/r/emacs.rss "Reddit Emacs"
https://www.gamingonlinux.com/article_rss.php "Gaming on linux"
https://hackaday.com/blog/feed/ "Hackaday"
https://opensource.com/feed "Opensource"
https://linux.softpedia.com/backend.xml "Softpedia Linux"
https://itsfoss.com/feed/ "ItsFoss"
https://www.zdnet.com/topic/linux/rss.xml "Zdnet Linux"
https://www.phoronix.com/rss.php "Phoronix"
http://feeds.feedburner.com/d0od "Omg Ubuntu"
https://www.computerworld.com/index.rss "Computerworld"
https://www.networkworld.com/category/linux/index.rss "Networkworld Linux"
https://www.techrepublic.com/rssfeeds/topic/open-source/ "Techrepublic opensource"
https://betanews.com/feed "Betanews Linux"
http://lxer.com/module/newswire/headlines.rss "Lxer"
https://distrowatch.com/news/dwd.xml "Distrowatch"

View file

@ -181,8 +181,8 @@ c.tabs.show = 'always'
# Setting default page for when opening new tabs or new windows with
# commands like :open -t and :open -w .
c.url.default_page = 'https://search.brave.com/'
c.url.start_pages = 'https://search.brave.com/'
c.url.default_page = '~/.config/qutebrowser/homepage/homepage.html'
c.url.start_pages = '~/.config/qutebrowser/homepage/homepage.html'
# Search engines which can be used via the address bar. Maps a search
# engine name (such as `DEFAULT`, or `ddg`) to a URL with a `{}`

View file

@ -0,0 +1,124 @@
@import url('https://fonts.googleapis.com/css?family=Roboto+Mono');
@import url('https://fonts.googleapis.com/css?family=Roboto');
@import url('https://fonts.googleapis.com/css?family=Anton');
body {
background-color: #282c34;
margin: 0px;
}
.container {
width: 100%;
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
}
#clock {
font-family: sans-serif;
font-size: 4.0rem;
font-family: "Anton";
color: #fff;
margin-bottom: .25em;
}
#search {
width: 100%;
height: 100vh;
background-color: #000000;
display: none;
position: absolute;
box-sizing: border-box;
flex-direction: column;
align-items: center;
justify-content: center;
}
#search-field {
width: 90%;
padding: .75em 1em;
box-sizing: border-box;
background-color: #000000;
border: solid 0px #000000;
font-family: "Roboto Mono";
font-size: 4rem;
color: #f2f2f2;
outline: none;
border-radius: 3px;
margin-bottom: 1em;
text-align: center;
}
.weather-container {
width: 30%;
background-color: #000000;
padding: 1em;
border-radius: 3px;
font-family: "Roboto Mono";
font-size: 1.2rem;
color: #fff;
text-align: center;
}
.inline {
display: inline-block;
}
.bookmark-container {
display: flex;
flex-direction: row;
justify-content: center;
width: 60%;
margin: 1em 0em;
}
@media only screen and (max-width: 960px) {
.container {
height: auto;
}
#clock {
margin-top: 1em;
}
.container > .bookmark-container {
flex-direction: column;
width: 60%;
}
.bookmark-container > .bookmark-set {
width: auto;
margin: 1em 0em;
}
}
.bookmark-set{
padding: 1em;
background-color: #000000;
border-radius: 3px;
font-family: "Roboto Mono";
font-size: .85rem;
width: 25%;
height: 16em;
margin: 0em .5em;
}
.bookmark-inner-container {
overflow-y: scroll;
height: 80%;
vertical-align: top;
}
.bookmark-title {
font-family: "Roboto";
font-size: 1.2rem;
font-weight: 600;
color: #ededed;
margin: 0em 0em .35em 0em;
}
.bookmark {
text-decoration: none;
color: #8c8c8b;
display:block;
margin: .4em 0em;
}
.bookmark:hover {
color: #fff;
}

View file

@ -0,0 +1,135 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Home</title>
<link rel="stylesheet" href="homepage.css">
<link href="favicon.png" rel="shortcut icon" type="image/x-icon" />
</head>
<body>
<div id="search">
<input id="search-field" type="text" name="search-field"/>
</div>
<div class="container">
<div id="clock"></div>
<div class="weather-container">
<div class="row">
<div id="weather-description"class="inline"></div>
<div class="inline">-</div>
<div id="temp" class="inline"></div>
</div>
</div>
<div class="bookmark-container">
<div class="bookmark-set">
<div class="bookmark-title">Linux Related</div>
<div class="bookmark-inner-container">
<a class="bookmark" href="https://distro.tube/" target="_blank">DistroTube</a>
<a class="bookmark" href="https://www.switchedtolinux.com" target="_blank">Switched to Linux</a>
<a class="bookmark" href="https://www.linuxtoday.com/" target="_blank">LinuxToday</a>
<a class="bookmark" href="https://www.linuxinsider.com/" target="_blank">LinuxInsider</a>
<a class="bookmark" href="https://omgubuntu.co.uk/" target="_blank">OMG Ubuntu</a>
<a class="bookmark" href="https://itsfoss.com/" target="_blank">It's Foss</a>
<a class="bookmark" href="https://phoronix.com/" target="_blank">Phoronix</a>
<a class="bookmark" href="https://www.zdnet.com/topic/linux/" target="_blank">ZDNet</a>
</div>
</div>
<div class="bookmark-set">
<div class="bookmark-title">Free Software</div>
<div class="bookmark-inner-container">
<a class="bookmark" href="https://www.gnu.org/" target="_blank">GNU</a>
<a class="bookmark" href="https://www.fsf.org/" target="_blank">FSF</a>
<a class="bookmark" href="https://www.eff.org" target="_blank">EFF</a>
<a class="bookmark" href="https://libreplanet.org/wiki/Main_Page" target="_blank">LibrePlanet</a>
<a class="bookmark" href="https://www.minifree.org" target="_blank">Minifree Store</a>
</div>
</div>
<div class="bookmark-set">
<div class="bookmark-title">Social & Video</div>
<div class="bookmark-inner-container">
<a class="bookmark" href="https://youtube.com/" target="_blank">Youtube</a>
<a class="bookmark" href="https://music.youtube.com/" target="_blank">Youtube Music</a>
<a class="bookmark" href="https://odysee.com/" target="_blank">Odysee</a>
<a class="bookmark" href="https://github.com/d4r1us-drk/" target="_blank">GitHub</a>
<a class="bookmark" href="https://web.whatsapp.com/" target="_blank">Whatsapp</a>
</div>
</div>
<div class="bookmark-set">
<div class="bookmark-title">Reddit</div>
<div class="bookmark-inner-container">
<a class="bookmark" href="https://reddit.com/r/linux" target="_blank">/r/linux</a>
<a class="bookmark" href="https://reddit.com/r/archlinux" target="_blank">/r/archlinux</a>
<a class="bookmark" href="https://reddit.com/r/commandline" target="_blank">/r/commandline</a>
<a class="bookmark" href="https://reddit.com/r/linux4noobs" target="_blank">/r/linux4noobs</a>
<a class="bookmark" href="https://reddit.com/r/linuxquestions" target="_blank">/r/linuxquestions</a>
<a class="bookmark" href="https://reddit.com/r/linuxmemes" target="_blank">/r/linuxmemes</a>
<a class="bookmark" href="https://reddit.com/r/suckless" target="_blank">/r/suckless</a>
<a class="bookmark" href="https://reddit.com/r/unixporn" target="_blank">/r/unixporn</a>
<a class="bookmark" href="https://reddit.com/r/vim" target="_blank">/r/vim</a>
<a class="bookmark" href="https://reddit.com/r/emacs" target="_blank">/r/emacs</a>
</div>
</div>
</div>
</div>
<script>
// Search on enter key event
document.getElementById("search-field").addEventListener("keydown", event => {
if (event.keyCode === 13) {
var val = document.getElementById("search-field").value;
window.open("https://google.com/search?q=" + val);
}
});
// Get current time and format
getTime = () => {
let date = new Date(),
min = date.getMinutes(),
sec = date.getSeconds(),
hour = date.getHours();
return "" +
(hour < 10 ? ("0" + hour) : hour) + ":" +
(min < 10 ? ("0" + min) : min) + ":" +
(sec < 10 ? ("0" + sec) : sec);
}
window.onload = () => {
let xhr = new XMLHttpRequest();
// Request to open weather map
xhr.open('GET', 'http://api.openweathermap.org/data/2.5/weather?id=4737316&units=imperial&appid=e5b292ae2f9dae5f29e11499c2d82ece');
xhr.onload = () => {
if (xhr.readyState === 4) {
if (xhr.status === 200) {
let json = JSON.parse(xhr.responseText);
console.log(json);
document.getElementById("temp").innerHTML = json.main.temp.toFixed(0) + " F";
document.getElementById("weather-description").innerHTML = json.weather[0].description;
} else {
console.log('error msg: ' + xhr.status);
}
}
}
xhr.send();
// Set up the clock
document.getElementById("clock").innerHTML = getTime();
// Set clock interval to tick clock
setInterval( () => {
document.getElementById("clock").innerHTML = getTime();
},100);
}
document.addEventListener("keydown", event => {
if (event.keyCode == 32) { // Spacebar code to open search
document.getElementById('search').style.display = 'flex';
document.getElementById('search-field').focus();
} else if (event.keyCode == 27) { // Esc to close search
document.getElementById('search-field').value = '';
document.getElementById('search-field').blur();
document.getElementById('search').style.display = 'none';
}
});
</script>
</body>
</html>

View file

@ -0,0 +1,317 @@
#!/usr/bin/env bash
# _ _ _ _ _ _
# __| |_ __ ___ ___ _ __ _ _ | |__ | |_ _ ___| |_ ___ ___ | |_ | |__
# / _` | '_ ` _ \ / _ \ '_ \| | | |_____| '_ \| | | | |/ _ \ __/ _ \ / _ \| __|| '_ \
# | (_| | | | | | | __/ | | | |_| |_____| |_) | | |_| | __/ || (_) | (_) | |_ | | | |
# \__,_|_| |_| |_|\___|_| |_|\__,_| |_.__/|_|\__,_|\___|\__\___/ \___/ \__||_| |_|
#
# Author: Nick Clyde (clydedroid)
# dmenu support by: Layerex
#
# A script that generates a dmenu menu that uses bluetoothctl to
# connect to bluetooth devices and display status info.
#
# Inspired by networkmanager-dmenu (https://github.com/firecat53/networkmanager-dmenu)
# Thanks to x70b1 (https://github.com/polybar/polybar-scripts/tree/master/polybar-scripts/system-bluetooth-bluetoothctl)
#
# Depends on:
# Arch repositories: dmenu, bluez-utils (contains bluetoothctl)
# Constants
divider="---------"
goback="Back"
# Checks if bluetooth controller is powered on
power_on() {
if bluetoothctl show | grep -F -q "Powered: yes"; then
return 0
else
return 1
fi
}
# Toggles power state
toggle_power() {
if power_on; then
bluetoothctl power off
show_menu
else
if rfkill list bluetooth | grep -F -q 'blocked: yes'; then
rfkill unblock bluetooth && sleep 3
fi
bluetoothctl power on
show_menu
fi
}
# Checks if controller is scanning for new devices
scan_on() {
if bluetoothctl show | grep -F -q "Discovering: yes"; then
echo "Scan: on"
return 0
else
echo "Scan: off"
return 1
fi
}
# Toggles scanning state
toggle_scan() {
if scan_on; then
kill "$(pgrep -F -f "bluetoothctl scan on")"
bluetoothctl scan off
show_menu
else
bluetoothctl scan on &
echo "Scanning..."
sleep 5
show_menu
fi
}
# Checks if controller is able to pair to devices
pairable_on() {
if bluetoothctl show | grep -F -q "Pairable: yes"; then
echo "Pairable: on"
return 0
else
echo "Pairable: off"
return 1
fi
}
# Toggles pairable state
toggle_pairable() {
if pairable_on; then
bluetoothctl pairable off
show_menu
else
bluetoothctl pairable on
show_menu
fi
}
# Checks if controller is discoverable by other devices
discoverable_on() {
if bluetoothctl show | grep -F -q "Discoverable: yes"; then
echo "Discoverable: on"
return 0
else
echo "Discoverable: off"
return 1
fi
}
# Toggles discoverable state
toggle_discoverable() {
if discoverable_on; then
bluetoothctl discoverable off
show_menu
else
bluetoothctl discoverable on
show_menu
fi
}
# Checks if a device is connected
device_connected() {
device_info=$(bluetoothctl info "$1")
if echo "$device_info" | grep -F -q "Connected: yes"; then
return 0
else
return 1
fi
}
# Toggles device connection
toggle_connection() {
if device_connected "$1"; then
bluetoothctl disconnect "$1"
# device_menu "$device"
else
bluetoothctl connect "$1"
# device_menu "$device"
fi
}
# Checks if a device is paired
device_paired() {
device_info=$(bluetoothctl info "$1")
if echo "$device_info" | grep -F -q "Paired: yes"; then
echo "Paired: yes"
return 0
else
echo "Paired: no"
return 1
fi
}
# Toggles device paired state
toggle_paired() {
if device_paired "$1"; then
bluetoothctl remove "$1"
device_menu "$device"
else
bluetoothctl pair "$1"
device_menu "$device"
fi
}
# Checks if a device is trusted
device_trusted() {
device_info=$(bluetoothctl info "$1")
if echo "$device_info" | grep -F -q "Trusted: yes"; then
echo "Trusted: yes"
return 0
else
echo "Trusted: no"
return 1
fi
}
# Toggles device connection
toggle_trust() {
if device_trusted "$1"; then
bluetoothctl untrust "$1"
device_menu "$device"
else
bluetoothctl trust "$1"
device_menu "$device"
fi
}
# Prints a short string with the current bluetooth status
# Useful for status bars like polybar, etc.
print_status() {
if power_on; then
printf ''
mapfile -t paired_devices < <(bluetoothctl paired-devices | grep -F Device | cut -d ' ' -f 2)
counter=0
for device in "${paired_devices[@]}"; do
if device_connected "$device"; then
device_alias="$(bluetoothctl info "$device" | grep -F "Alias" | cut -d ' ' -f 2-)"
if [ $counter -gt 0 ]; then
printf ", %s" "$device_alias"
else
printf " %s" "$device_alias"
fi
((counter++))
fi
done
printf "\n"
else
echo ""
fi
}
# A submenu for a specific device that allows connecting, pairing, and trusting
device_menu() {
device=$1
# Get device name and mac address
device_name="$(echo "$device" | cut -d ' ' -f 3-)"
mac="$(echo "$device" | cut -d ' ' -f 2)"
# Build options
if device_connected "$mac"; then
connected="Connected: yes"
else
connected="Connected: no"
fi
paired=$(device_paired "$mac")
trusted=$(device_trusted "$mac")
options="$connected\n$paired\n$trusted\n$divider\n$goback\nExit"
# Open dmenu menu, read chosen option
chosen="$(echo -e "$options" | run_dmenu "$device_name")"
# Match chosen option to command
case $chosen in
"" | "$divider")
echo "No option chosen."
;;
"$connected")
toggle_connection "$mac"
;;
"$paired")
toggle_paired "$mac"
;;
"$trusted")
toggle_trust "$mac"
;;
"$goback")
show_menu
;;
esac
}
# Opens a dmenu menu with current bluetooth status and options to connect
show_menu() {
# Get menu options
if power_on; then
power="Power: on"
# Human-readable names of devices, one per line
# If scan is off, will only list paired devices
devices=$(bluetoothctl devices | grep -F Device | cut -d ' ' -f 3-)
# Get controller flags
scan=$(scan_on)
pairable=$(pairable_on)
discoverable=$(discoverable_on)
# Options passed to dmenu
options="$devices\n$divider\n$power\n$scan\n$pairable\n$discoverable\nExit"
else
power="Power: off"
options="$power\nExit"
fi
# Open dmenu menu, read chosen option
chosen="$(echo -e "$options" | run_dmenu "Bluetooth")"
# Match chosen option to command
case $chosen in
"" | "$divider")
echo "No option chosen."
;;
"$power")
toggle_power
;;
"$scan")
toggle_scan
;;
"$discoverable")
toggle_discoverable
;;
"$pairable")
toggle_pairable
;;
*)
device=$(bluetoothctl devices | grep -F "$chosen")
# Open a submenu if a device is selected
if [[ $device ]]; then device_menu "$device"; fi
;;
esac
}
original_args=("$@")
# dmenu command to pipe into. Extra arguments to dmenu-bluetooth are passed through to dmenu. This
# allows the user to set fonts, sizes, colours, etc.
run_dmenu() {
dmenu "${original_args[@]}" -b -l 5 -i -p "$1"
}
case "$1" in
--status)
print_status
;;
*)
show_menu
;;
esac

View file

@ -174,7 +174,7 @@ static Key keys[] = {
/* File manager */
{ MODKEY, XK_a, XK_2, spawn, CMD("alacritty -e $HOME/.config/vifm/scripts/vifmrun") },
/* Web browser */
{ MODKEY, XK_a, XK_3, spawn, CMD("librewolf") },
{ MODKEY, XK_a, XK_3, spawn, CMD("qutebrowser") },
/* Chat app */
{ MODKEY, XK_a, XK_4, spawn, CMD("alacritty -e gomuks") },
/* Music player */
@ -193,6 +193,8 @@ static Key keys[] = {
{ MODKEY, XK_a, XK_F4, spawn, CMD("alacritty -e ani-cli") },
/* Flix-cli */
{ MODKEY, XK_a, XK_F5, spawn, CMD("alacritty -e flix-cli") },
/* Castero */
{ MODKEY, XK_a, XK_F6, spawn, CMD("alacritty -e castero") },
/* DMENU PROMPTS launched with emacs-style keychords SUPER + p (prompt) followed by "key" */
/* dmenu */
@ -209,7 +211,8 @@ static Key keys[] = {
{ MODKEY, XK_p, XK_s, spawn, CMD("$HOME/.config/suckless/dmenu/scripts/dmenu_scrot") },
/* dmenu_drun */
{ MODKEY, XK_p, XK_d, spawn, CMD("$HOME/.config/suckless/dmenu/scripts/dmenu_drun") },
/* dmenu_blue */
{ MODKEY, XK_p, XK_b, spawn, CMD("$HOME/.config/suckless/dmenu/scripts/dmenu_blue") },
/* DWM BOOTSTRAP */
{ MODKEY|ShiftMask, -1, XK_q, quit, {0} },