Some changes to basic ui things

This commit is contained in:
Chris Cochrun 2021-07-05 13:24:04 -05:00
parent aa1f2c7c28
commit 964f2aedb7
2 changed files with 95 additions and 60 deletions

View file

@ -315,7 +315,12 @@ There are two major packages we need to get the functionality I desire. Evil and
evil-want-C-u-scroll t
evil-respect-visual-line-mode t
evil-want-C-u-delete t
evil-undo-system 'undo-redo)
evil-undo-system 'undo-redo
scroll-conservatively 101
hscroll-margin 2
scroll-margin 0
scroll-preserve-screen-position t
hscroll-step 1)
:config
(evil-mode +1))
#+end_src
@ -344,6 +349,7 @@ This evil-collection package includes a lot of other evil based things.
"w" '(:ignore t :which-key "window")
"s" '(:ignore t :which-key "search")
"o" '(:ignore t :which-key "open")
"of" '(:ignore t :which-key "elfeed")
"h" '(:ignore t :which-key "help")
"n" '(:ignore t :which-key "notes")
"sp" '(:ignore t :which-key "passwords")
@ -363,7 +369,7 @@ This evil-collection package includes a lot of other evil based things.
"hi" '(info :which-key "info manual")
"ss" '(consult-line :which-key "consult search")
"sr" '(consult-ripgrep :which-key "consult ripgrep")
"ww" '(other-window :which-key "other window")
"wo" '(other-window :which-key "other window")
"wd" '(delete-window :which-key "other window")
"wv" '(evil-window-vsplit :which-key "split window vertically")
"ws" '(evil-window-split :which-key "split window horizontally")
@ -580,13 +586,13 @@ Consult has a lot of nice functions like Ivy's Counsel functions (enhanced searc
(use-package consult
:after selectrum
:config
(setq consult-narrow-key "<")
(setq consult-narrow-key "'")
:general
(chris/leader-keys
:states 'normal
:keymaps 'override
"si" 'consult-imenu
"so" 'consult-outline))
"so" 'consult-org-heading))
#+end_src
#+begin_src emacs-lisp :tangle no
@ -711,6 +717,17 @@ Since I like to make my window manager handle a lot of the window management, I
(delete-frame))
#+end_src
*** Ace Window
#+begin_src emacs-lisp
(use-package ace-window
:config (ace-window-display-mode)
:general
(chris/leader-keys
:states 'normal
:keymaps 'override
"ww" '(ace-window :which-key "select window")))
#+end_src
** Help
#+begin_src emacs-lisp
(use-package helpful
@ -915,7 +932,6 @@ We need a function to copy the full filename to kill-ring
#+begin_src emacs-lisp
(use-package dired-rsync
:after dired
:general
(general-def 'normal dired-mode-map
"C" 'dired-rsync))
@ -1637,6 +1653,7 @@ Let's add our own eshell prompt. and set the password cache to a significantly h
(setq eshell-history-size 1024)
;;; Extra execution information
(defvar chris/eshell-status-p t
"If non-nil, display status before prompt.")
@ -1703,18 +1720,9 @@ Let's add our own eshell prompt. and set the password cache to a significantly h
(setq eshell-banner-message "")
:general
(chris/leader-keys
:states 'normal
:keymaps 'override
"oe" 'eshell)
(general-def '(normal insert) eshell-mode-map
"C-d" 'kill-buffer-and-window))
#+end_src
(add-hook 'eshell-mode-hook '(hscroll-margin 0))
(add-hook 'eshell-mode-hook '(display-line-numbers-mode -1))
*** Eshell Aliases
I love using eshell, so lets make some commands even easier with aliases.
#+begin_src emacs-lisp
(setq eshell-command-aliases-list
'(("ls" "exa $1")
("la" "exa -la $1")
@ -1730,6 +1738,14 @@ I love using eshell, so lets make some commands even easier with aliases.
("!c" "eshell-previous-input 2")
("yay" "paru")
("yeet" "paru -Rns")))
:general
(chris/leader-keys
:states 'normal
:keymaps 'override
"oe" 'eshell)
(general-def '(normal insert) eshell-mode-map
"C-d" 'kill-buffer-and-window))
#+end_src
** Sly
@ -1816,7 +1832,7 @@ interfere with the default `bongo-playlist-buffer'."
(switch-to-buffer buffer)
(message "No `bongo' playlist is associated with `elfeed'."))))
(add-hook 'elfeed-search-update-hook '(toggle-truncate-lines +1))
(setq elfeed-search-filter "@6-days-ago +unread")
:general
(chris/leader-keys
@ -1843,24 +1859,25 @@ interfere with the default `bongo-playlist-buffer'."
(use-package bongo
:commands (bongo bongo-playlist-buffer)
:config
(define-bongo-backend mpv-slow
:program-name 'mpv
:constructor 'bongo-start-mpv-player
:extra-program-arguments '("--profile=slow --input-ipc-server=/tmp/mpvsocket")
:matcher '((local-file "file:" "http:" "ftp:" "lbry:")
"ogg" "flac" "mp3" "mka" "wav"
"ogm" "opus" )
:matcher '(("mms:" "mmst:" "rtp:" "rtsp:" "udp:" "unsv:"
"dvd:" "vcd:" "tv:" "dvb:" "mf:" "cdda:" "cddb:"
"cue:" "sdp:" "mpst:" "tivo:") . t)
:matcher '(("http:" "https:" "lbry:") . t))
;; (define-bongo-backend mpv-slow
;; :program-name 'mpv
;; :constructor 'bongo-start-mpv-player
;; :extra-program-arguments '("--profile=slow --input-ipc-server=/tmp/mpvsocket")
;; :matcher '((local-file "file:" "http:" "ftp:" "lbry:")
;; "ogg" "flac" "mp3" "mka" "wav"
;; "ogm" "opus" )
;; :matcher '(("mms:" "mmst:" "rtp:" "rtsp:" "udp:" "unsv:"
;; "dvd:" "vcd:" "tv:" "dvb:" "mf:" "cdda:" "cddb:"
;; "cue:" "sdp:" "mpst:" "tivo:") . t)
;; :matcher '(("http:" "https:" "lbry:") . t))
(define-bongo-backend mpv-fast
(define-bongo-backend mpv
:constructor 'bongo-start-mpv-player
:program-name 'mpv
:extra-program-arguments '("--profile=fast --input-ipc-server=/tmp/mpvsocket")
:matcher '((local-file "file:" "http:" "ftp:" "lbry:")
"mka" "wav" "wma"
"mpg" "mpeg" "vob" "avi" "ogm" "mp4"
"wma" "ogg" "flac" "mp3" "mka" "wav"
"mpg" "mpeg" "vob" "avi" "ogm" "opus" "mp4"
"mkv" "mov" "asf" "wmv" "rm" "rmvb" "ts")
:matcher '(("mms:" "mmst:" "rtp:" "rtsp:" "udp:" "unsv:"
"dvd:" "vcd:" "tv:" "dvb:" "mf:" "cdda:" "cddb:"

72
init.el
View file

@ -185,7 +185,12 @@
evil-want-C-u-scroll t
evil-respect-visual-line-mode t
evil-want-C-u-delete t
evil-undo-system 'undo-redo)
evil-undo-system 'undo-redo
scroll-conservatively 101
hscroll-margin 2
scroll-margin 0
scroll-preserve-screen-position t
hscroll-step 1)
:config
(evil-mode +1))
@ -209,6 +214,7 @@
"w" '(:ignore t :which-key "window")
"s" '(:ignore t :which-key "search")
"o" '(:ignore t :which-key "open")
"of" '(:ignore t :which-key "elfeed")
"h" '(:ignore t :which-key "help")
"n" '(:ignore t :which-key "notes")
"sp" '(:ignore t :which-key "passwords")
@ -228,7 +234,7 @@
"hi" '(info :which-key "info manual")
"ss" '(consult-line :which-key "consult search")
"sr" '(consult-ripgrep :which-key "consult ripgrep")
"ww" '(other-window :which-key "other window")
"wo" '(other-window :which-key "other window")
"wd" '(delete-window :which-key "other window")
"wv" '(evil-window-vsplit :which-key "split window vertically")
"ws" '(evil-window-split :which-key "split window horizontally")
@ -322,13 +328,13 @@ vertically."
(use-package consult
:after selectrum
:config
(setq consult-narrow-key "<")
(setq consult-narrow-key "'")
:general
(chris/leader-keys
:states 'normal
:keymaps 'override
"si" 'consult-imenu
"so" 'consult-outline))
"so" 'consult-org-heading))
(use-package marginalia
:bind (:map minibuffer-local-map
@ -415,6 +421,14 @@ vertically."
(kill-this-buffer)
(delete-frame))
(use-package ace-window
:config (ace-window-display-mode)
:general
(chris/leader-keys
:states 'normal
:keymaps 'override
"ww" '(ace-window :which-key "select window")))
(use-package helpful
:commands (helpful-callable helpful-variable helpful-command helpful-key)
:general
@ -545,7 +559,6 @@ vertically."
:config (diredfl-global-mode +1))
(use-package dired-rsync
:after dired
:general
(general-def 'normal dired-mode-map
"C" 'dired-rsync))
@ -1192,6 +1205,7 @@ If on a:
(setq eshell-history-size 1024)
;;; Extra execution information
(defvar chris/eshell-status-p t
"If non-nil, display status before prompt.")
@ -1258,13 +1272,8 @@ If on a:
(setq eshell-banner-message "")
:general
(chris/leader-keys
:states 'normal
:keymaps 'override
"oe" 'eshell)
(general-def '(normal insert) eshell-mode-map
"C-d" 'kill-buffer-and-window))
(add-hook 'eshell-mode-hook '(hscroll-margin 0))
(add-hook 'eshell-mode-hook '(display-line-numbers-mode -1))
(setq eshell-command-aliases-list
'(("ls" "exa $1")
@ -1282,6 +1291,14 @@ If on a:
("yay" "paru")
("yeet" "paru -Rns")))
:general
(chris/leader-keys
:states 'normal
:keymaps 'override
"oe" 'eshell)
(general-def '(normal insert) eshell-mode-map
"C-d" 'kill-buffer-and-window))
(use-package sly
:mode ("\\.lisp\\'" . sly-mode))
@ -1353,7 +1370,7 @@ interfere with the default `bongo-playlist-buffer'."
(switch-to-buffer buffer)
(message "No `bongo' playlist is associated with `elfeed'."))))
(add-hook 'elfeed-search-update-hook '(toggle-truncate-lines +1))
(setq elfeed-search-filter "@6-days-ago +unread")
:general
(chris/leader-keys
@ -1375,24 +1392,25 @@ interfere with the default `bongo-playlist-buffer'."
(use-package bongo
:commands (bongo bongo-playlist-buffer)
:config
(define-bongo-backend mpv-slow
:program-name 'mpv
:constructor 'bongo-start-mpv-player
:extra-program-arguments '("--profile=slow --input-ipc-server=/tmp/mpvsocket")
:matcher '((local-file "file:" "http:" "ftp:" "lbry:")
"ogg" "flac" "mp3" "mka" "wav"
"ogm" "opus" )
:matcher '(("mms:" "mmst:" "rtp:" "rtsp:" "udp:" "unsv:"
"dvd:" "vcd:" "tv:" "dvb:" "mf:" "cdda:" "cddb:"
"cue:" "sdp:" "mpst:" "tivo:") . t)
:matcher '(("http:" "https:" "lbry:") . t))
;; (define-bongo-backend mpv-slow
;; :program-name 'mpv
;; :constructor 'bongo-start-mpv-player
;; :extra-program-arguments '("--profile=slow --input-ipc-server=/tmp/mpvsocket")
;; :matcher '((local-file "file:" "http:" "ftp:" "lbry:")
;; "ogg" "flac" "mp3" "mka" "wav"
;; "ogm" "opus" )
;; :matcher '(("mms:" "mmst:" "rtp:" "rtsp:" "udp:" "unsv:"
;; "dvd:" "vcd:" "tv:" "dvb:" "mf:" "cdda:" "cddb:"
;; "cue:" "sdp:" "mpst:" "tivo:") . t)
;; :matcher '(("http:" "https:" "lbry:") . t))
(define-bongo-backend mpv-fast
(define-bongo-backend mpv
:constructor 'bongo-start-mpv-player
:program-name 'mpv
:extra-program-arguments '("--profile=fast --input-ipc-server=/tmp/mpvsocket")
:matcher '((local-file "file:" "http:" "ftp:" "lbry:")
"mka" "wav" "wma"
"mpg" "mpeg" "vob" "avi" "ogm" "mp4"
"wma" "ogg" "flac" "mp3" "mka" "wav"
"mpg" "mpeg" "vob" "avi" "ogm" "opus" "mp4"
"mkv" "mov" "asf" "wmv" "rm" "rmvb" "ts")
:matcher '(("mms:" "mmst:" "rtp:" "rtsp:" "udp:" "unsv:"
"dvd:" "vcd:" "tv:" "dvb:" "mf:" "cdda:" "cddb:"