add vi keys for org-agenda
This commit is contained in:
parent
2b4a99bd07
commit
5b47a4d827
60
emacs/.emacs
60
emacs/.emacs
@ -76,6 +76,13 @@
|
||||
;; Make :q not quit entire emacs and just try to delete current split
|
||||
(evil-ex-define-cmd "q[uit]" 'evil-window-delete )
|
||||
;
|
||||
;; Shortcuts to go back/forth between current buffers
|
||||
(evil-global-set-key 'normal (kbd "gt") 'next-buffer)
|
||||
(evil-global-set-key 'normal (kbd "gT") 'previous-buffer)
|
||||
;
|
||||
;; Shortcut to switch to last buffer
|
||||
(evil-global-set-key 'normal (kbd "gl") 'evil-buffer)
|
||||
;
|
||||
;; Vim digraphs
|
||||
(load-file "~/.config/emacs/digraphs.el")
|
||||
|
||||
@ -99,6 +106,9 @@
|
||||
; DONE: Completed
|
||||
; NODO: Can't be done or not going to be done anymore
|
||||
;
|
||||
; and maybe the following as well:
|
||||
; DING: Doing. In-progress. Useful for events that span multiple days
|
||||
; POST: Postponed
|
||||
(setq org-todo-keywords
|
||||
'((sequence "TODO" "|" "DONE" "NODO")))
|
||||
;
|
||||
@ -115,6 +125,56 @@
|
||||
;; org-agenda
|
||||
; https://stackoverflow.com/questions/44094125/org-mode-c-c-a-undefined/44096106
|
||||
(define-key global-map "\C-ca" 'org-agenda)
|
||||
;
|
||||
;; Have a couple of vi-like keys in agenda view
|
||||
; https://lists.gnu.org/archive/html/emacs-orgmode/2013-04/msg01119.html
|
||||
; https://gist.github.com/amirrajan/301e74dc844a4c9ffc3830dc4268f177
|
||||
(with-eval-after-load 'org-agenda
|
||||
; Cursor movement
|
||||
;(define-key org-agenda-mode-map "j" 'evil-next-line)
|
||||
;(define-key org-agenda-mode-map "k" 'evil-previous-line))
|
||||
(define-key org-agenda-mode-map "j" 'org-agenda-next-line)
|
||||
(define-key org-agenda-mode-map "k" 'org-agenda-previous-line)
|
||||
|
||||
; Scrolling
|
||||
(define-key org-agenda-mode-map (kbd "C-f") 'evil-scroll-page-down)
|
||||
(define-key org-agenda-mode-map (kbd "C-b") 'evil-scroll-page-up)
|
||||
;(define-key org-agenda-mode-map (kbd "C-b") 'org-agenda-show-scroll-down)
|
||||
(define-key org-agenda-mode-map (kbd "C-e") 'evil-scroll-line-down)
|
||||
(define-key org-agenda-mode-map (kbd "C-y") 'evil-scroll-line-up)
|
||||
|
||||
; Split navigation
|
||||
(define-key org-agenda-mode-map (kbd "C-w H") 'evil-window-move-far-left)
|
||||
(define-key org-agenda-mode-map (kbd "C-w L") 'evil-window-move-far-right)
|
||||
(define-key org-agenda-mode-map (kbd "C-w K") 'evil-window-move-very-top)
|
||||
(define-key org-agenda-mode-map (kbd "C-w J") 'evil-window-move-very-bottom)
|
||||
|
||||
(define-key org-agenda-mode-map (kbd "C-w v") 'evil-window-vsplit)
|
||||
(define-key org-agenda-mode-map (kbd "C-w s") 'evil-window-split)
|
||||
(define-key org-agenda-mode-map (kbd "C-w w") 'evil-window-next)
|
||||
|
||||
(define-key org-agenda-mode-map (kbd "C-w k") 'evil-window-up)
|
||||
(define-key org-agenda-mode-map (kbd "C-w h") 'evil-window-left)
|
||||
(define-key org-agenda-mode-map (kbd "C-w l") 'evil-window-right)
|
||||
(define-key org-agenda-mode-map (kbd "C-w j") 'evil-window-down)
|
||||
|
||||
; Split resizing
|
||||
(define-key org-agenda-mode-map (kbd "C-w <") 'evil-window-decrease-width)
|
||||
(define-key org-agenda-mode-map (kbd "C-w >") 'evil-window-increase-width)
|
||||
(define-key org-agenda-mode-map (kbd "C-w -") 'evil-window-decrease-height)
|
||||
(define-key org-agenda-mode-map (kbd "C-w +") 'evil-window-increase-height)
|
||||
|
||||
; Misc
|
||||
(define-key org-agenda-mode-map (kbd "C-c C-g") 'org-agenda-redo-all)
|
||||
; (define-key org-agenda-mode-map (kbd "g g") 'evil-goto-first-line)
|
||||
; (define-key org-agenda-mode-map (kbd "g l") 'evil-buffer)
|
||||
|
||||
(define-key org-agenda-mode-map (kbd "h") 'evil-backward-char)
|
||||
(define-key org-agenda-mode-map (kbd "C-c C-l") 'org-agenda-holidays)
|
||||
|
||||
(define-key org-agenda-mode-map (kbd "l") 'evil-forward-char)
|
||||
(define-key org-agenda-mode-map (kbd "C-c C-l") 'org-agenda-log-mode))
|
||||
|
||||
;
|
||||
;; Set agenda files for org-agenda
|
||||
(setq org-agenda-files (quote ("~/today/agenda.org" "~/org.org")))
|
||||
|
@ -1 +1,2 @@
|
||||
text/html; lynx -dump %s; nametemplate=%s.html; copiousoutput;
|
||||
application/pdf; zathura %s; test=test -n "$DISPLAY"
|
||||
|
@ -1,10 +1,47 @@
|
||||
# References:
|
||||
# - https://github.com/The-Compiler/dotfiles/blob/master/qutebrowser/config.py
|
||||
# - https://qutebrowser.org/doc/help/configuring.html#configpy
|
||||
"""
|
||||
References:
|
||||
|
||||
- https://github.com/The-Compiler/dotfiles/blob/master/qutebrowser/config.py
|
||||
- https://qutebrowser.org/doc/help/configuring.html#configpy
|
||||
- https://qutebrowser.org/FAQ.html
|
||||
"""
|
||||
|
||||
## Load autoconfig.yml as set from browser UI
|
||||
config.load_autoconfig()
|
||||
|
||||
# Using this qutebrowser api isn't officially supported yet
|
||||
import qutebrowser.api.interceptor
|
||||
|
||||
REWRITE_URLS = {
|
||||
"www.reddit.com": "old.reddit.com",
|
||||
}
|
||||
|
||||
def rewrite_url(request: qutebrowser.api.interceptor.Request):
|
||||
cur_url = request.request_url.host()
|
||||
if cur_url in REWRITE_URLS:
|
||||
request.request_url.setHost(REWRITE_URLS[cur_url])
|
||||
try:
|
||||
request.redirect(request.request_url)
|
||||
except:
|
||||
pass
|
||||
|
||||
# Redirect some URLs to more friendly equivalents
|
||||
qutebrowser.api.interceptor.register(rewrite_url)
|
||||
|
||||
## Add duplicate key bindings for scrolling
|
||||
# Ctrl/ctrl/Control/control
|
||||
config.bind('<Ctrl-y>', 'scroll up')
|
||||
|
||||
# C-e is also used to open editor in insert mode
|
||||
config.bind('<Ctrl-e>', 'scroll down', mode='normal')
|
||||
|
||||
#config.bind(',js', 'tsh')
|
||||
#https://old.reddit.net/r/archlinux/comments/5m2os3/mpv_is_it_possible_to_change_video_quality_while/
|
||||
config.bind(',mpv', 'spawn mpv --ytdl-format 18 {url}')
|
||||
config.bind(',Mpv', 'hint links spawn mpv --ytdl-format 18 {hint-url}')
|
||||
|
||||
|
||||
|
||||
c.new_instance_open_target = 'window'
|
||||
#c.downloads.position = 'bottom'
|
||||
|
||||
@ -13,6 +50,29 @@ c.url.searchengines['g'] = 'https://www.google.com/search?q={}'
|
||||
c.url.searchengines['w'] = 'https://en.wikipedia.org/w/index.php?search={}'
|
||||
|
||||
## Set external editor
|
||||
#c.editor.command = ['gvim', '{}']
|
||||
c.editor.command = ['emacs', '{}']
|
||||
|
||||
#c.content.javascript.enabled = False
|
||||
## Javascript stuff
|
||||
c.content.javascript.enabled = False # tsh: shortcut to toggle JS
|
||||
c.content.javascript.can_open_tabs_automatically = False
|
||||
c.content.javascript.can_access_clipboard = False
|
||||
#c.content.javascript.can_close_tabs = False
|
||||
|
||||
## Don't allow notifications
|
||||
c.content.notifications.enabled = False
|
||||
|
||||
## Don't start playing videos automatically. Data is expensive.
|
||||
c.content.autoplay = False
|
||||
|
||||
## Per-domain settings
|
||||
with config.pattern("*://.youtube.com") as youtube:
|
||||
youtube.content.cookies.accept = "never"
|
||||
|
||||
with config.pattern("*//.amazon.*") as amazon:
|
||||
amazon.content.cookies.accept = "never"
|
||||
|
||||
## Statusbar
|
||||
#c.statusbar.widgets[-1] = f"text:TEST"
|
||||
|
||||
#config.source("sample.py")
|
||||
|
@ -1,7 +1,16 @@
|
||||
# https://askubuntu.com/questions/472540/is-there-a-pdf-reader-allowing-me-to-change-background-color-of-arxiv-pdfs
|
||||
#set recolor true
|
||||
#set recolor-darkcolor "#dcdccc"
|
||||
#set recolor-lightcolor "#1f1f1f"
|
||||
# https://pwmt.org/projects/zathura/documentation/
|
||||
# https://wiki.archlinux.org/title/Zathura
|
||||
#
|
||||
#set default-bg \#f0f0d1
|
||||
|
||||
set sandbox strict
|
||||
|
||||
set window-title-basename "true"
|
||||
set selection-clipboard "clipboard"
|
||||
|
||||
# Change some colors
|
||||
set recolor true
|
||||
set recolor-keephue
|
||||
set recolor-lightcolor "#f1f1d4"
|
||||
#set recolor-lightcolor "#f0f0d1"
|
||||
set recolor-darkcolor "#000000"
|
||||
|
Loading…
Reference in New Issue
Block a user