aboutsummaryrefslogtreecommitdiff
path: root/emacs/.emacs.d/init/ycp-client.el
diff options
context:
space:
mode:
authorYuchen Pei <id@ypei.org>2023-06-17 17:20:29 +1000
committerYuchen Pei <id@ypei.org>2023-06-17 17:20:29 +1000
commit093ffa5fbf7143f4668bb0a3dc9659a5cc836e12 (patch)
tree1ed4e14b2a43b8e338f4ad6a04d969b99b9239be /emacs/.emacs.d/init/ycp-client.el
parentabc686827ae38ee715d9eed1c5c29161c74127e6 (diff)
Moving things one level deeper
To ease gnu stow usage. Now we can do stow -t ~ emacs
Diffstat (limited to 'emacs/.emacs.d/init/ycp-client.el')
-rw-r--r--emacs/.emacs.d/init/ycp-client.el104
1 files changed, 104 insertions, 0 deletions
diff --git a/emacs/.emacs.d/init/ycp-client.el b/emacs/.emacs.d/init/ycp-client.el
new file mode 100644
index 0000000..def2351
--- /dev/null
+++ b/emacs/.emacs.d/init/ycp-client.el
@@ -0,0 +1,104 @@
+;;; ycp-client.el -- My config for non-http clients -*- lexical-binding: t -*-
+
+;; Copyright (C) 2023 Free Software Foundation.
+
+;; Author: Yuchen Pei <id@ypei.org>
+;; Package-Requires: ((emacs "28.2"))
+
+;; This file is part of dotfiles.
+
+;; dotfiles is free software: you can redistribute it and/or modify it under
+;; the terms of the GNU Affero General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; dotfiles 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 Affero General
+;; Public License for more details.
+
+;; You should have received a copy of the GNU Affero General Public
+;; License along with dotfiles. If not, see <https://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; My config for non-http clients. like wget, ytdl, sql, irc, etc
+
+
+;;; Code:
+
+;;; Note: erc is only allowed when `my-profile' is erc, as assigned in early-init.el
+(my-package erc
+ (setq erc-lurker-hide-list '("JOIN" "PART" "QUIT"))
+ (setq erc-disable-ctcp-replies t)
+ (setq erc-modules
+ '(button completion irccontrols list match menu move-to-prompt
+ netsplit networks noncommands notifications readonly
+ ring stamp track))
+ (my-setq-from-local erc-track-exclude erc-server erc-nick erc-port)
+ ;; use auth-source for authentication
+ (setq erc-prompt-for-password nil)
+ (setq erc-paranoid t)
+ (setq erc-fill-mode t)
+ (require 'erc-match)
+ (set-face-attribute 'erc-fool-face nil :foreground "white")
+ (setq erc-fool-highlight-type 'all)
+ (my-setq-from-local erc-fools)
+ (erc-tls))
+
+(my-package dictionary
+ (:delay 15)
+ (autoload 'dictionary-search "dictionary"
+ "Ask for a word and search it in all dictionaries" t)
+ (autoload 'dictionary-match-words "dictionary"
+ "Ask for a word and search all matching words in the dictionaries" t)
+ (autoload 'dictionary-lookup-definition "dictionary"
+ "Unconditionally lookup the word at point." t)
+ (autoload 'dictionary "dictionary"
+ "Create a new dictionary buffer" t)
+ (autoload 'dictionary-mouse-popup-matching-words "dictionary"
+ "Display entries matching the word at the cursor" t)
+ (autoload 'dictionary-popup-matching-words "dictionary"
+ "Display entries matching the word at the point" t)
+ (autoload 'dictionary-tooltip-mode "dictionary"
+ "Display tooltips for the current word" t)
+ (autoload 'global-dictionary-tooltip-mode "dictionary"
+ "Enable/disable dictionary-tooltip-mode for all buffers" t)
+ (my-keybind global-map
+ "C-c dd" #'dictionary-search
+ "C-c dm" #'dictionary-match-words)
+ (setq dictionary-server "dict.org"
+ dictionary-default-popup-strategy "lev" ; read doc string
+ dictionary-create-buttons nil
+ dictionary-use-single-buffer t))
+
+(my-package wget
+ (:delay 60)
+ (setq wget-download-directory "~/Downloads")
+ (setq my-wget-size-threshold (* 20 1024 1024))
+ (require 'my-wget)
+ (my-setq-from-local my-wget-video-archive-directory)
+ (my-keybind eww-mode-map "s" #'my-eww-wget-save-page)
+)
+
+(my-package my-ytdl
+ (:delay 60)
+ (my-setq-from-local my-ytdl-audio-download-dir my-ytdl-video-download-dir))
+
+(my-package my-media-segment
+ (:delay 60))
+
+(my-package detached
+ (:install t)
+ (:delay 60)
+ (my-keybind detached-shell-mode-map
+ "C-<return>" nil
+ "C-S-<return>" #'detached-attach-session)
+ (require 'my-detached)
+ (my-keybind global-map "\M-z" #'my-execute-external-command)
+)
+
+(my-package pactl (:delay 60))
+
+(provide 'ycp-client)
+;;; ycp-client.el ends here