Emacs init.el

back

;; Use a minimal cursor
(setq default-cursor-type 'hbar)


;; Don't use messages that you don't read
(setq initial-scratch-message "")
(setq inhibit-startup-message t)
;; Don't let Emacs hurt your ears
(setq visible-bell t)

;; no distractions

(tool-bar-mode -1)
(toggle-scroll-bar -1)
(menu-bar-mode -1)


;; windmove

(when (fboundp 'windmove-default-keybindings)
  (windmove-default-keybindings))

;; window resize

(global-set-key (kbd "S-C-<left>") 'shrink-window-horizontally)
(global-set-key (kbd "S-C-<right>") 'enlarge-window-horizontally)
(global-set-key (kbd "S-C-<down>") 'shrink-window)
(global-set-key (kbd "S-C-<up>") 'enlarge-window)

;; melpa

(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)

(setq package-selected-packages '(emms elfeed elfeed-goodies mastodon vterm undo-tree))

(package-initialize)

;; install selected packages
(unless package-archive-contents
  (package-refresh-contents))

(package-install-selected-packages)

;; undo tree

(global-undo-tree-mode)


(custom-set-variables
 '(custom-enabled-themes '(wombat))
 '(elfeed-feeds
   '("https://tube.tchncs.de/feeds/videos.xml?videoChannelId=5" 
     "https://tube.tchncs.de/feeds/videos.xml?videoChannelId=2511" 
     "https://iridiumbrowser.de/feed.xml" 
     "https://www.reddit.com/r/dragonflybsd.rss" 
     "https://www.reddit.com/r/GUIX.rss" 
     "https://rubenerd.com/feed/"
     "https://www.reddit.com/r/emacs.rss"
     "https://www.reddit.com/r/usabilityporn.rss"
     "https://www.reddit.com/r/bsd.rss"
     "https://videos.lukesmith.xyz/feeds/videos.xml?sort=-publishedAt"
     "https://forum.palemoon.org/feed.php?f=1"
     "https://www.dragonflydigest.com/feed"
     "https://video.hardlimit.com/feeds/videos.xml?videoChannelId=39"
     "https://reddit.com/r/perl.rss"))
	'(erc-nick "kotrcka")
	 '(erc-port 6667)
	 '(erc-prompt-for-nickserv-password t)
	 '(erc-server "chat.freenode.net")
     '(undo-tree-visualizer-diff t)
     '(undo-tree-visualizer-relative-timestamps t))

;; mastodon.el

(setq mastodon-instance-url "https://nerdculture.de")
(setq mastodon-auth-source-file "/home/peter/.emacs.d/masto")

;; eww settings

(setq
 browse-url-browser-function 'eww-browse-url ; Use eww as the default browser
 shr-use-fonts  nil                          ; No special fonts
 shr-use-colors nil                          ; No colours
 shr-indentation 2                           ; Left-side margin
 eww-search-prefix "https://lite.qwant.com/?q=") ; Use Qwant Lite for search (default)


;; key bindings

(global-set-key (kbd "C-x C-b") 'ibuffer)
(global-set-key (kbd "C-x C-E") 'emms-add-directory-tree)
(global-set-key (kbd "C-x w") 'elfeed)
(global-set-key (kbd "C-x M-w") 'elfeed-update)
(global-set-key (kbd "C-x M-p") 'emms-play-dired)

(custom-set-faces
 '(default ((t (:family "Source Code Pro" :foundry "ADBO" :slant normal :weight normal :height 128 :width normal)))))

;; set URL handler

(setq browse-url-generic-program
       (executable-find "firefox"))



;; EMMS

(require 'emms-setup)
(require 'emms-player-simple)
(require 'emms-source-file)
(emms-all)
(emms-default-players)
;;default music dir

;; (setq emms-source-file-default-directory "~/Hudba/")

(setq emms-player-list '(emms-player-mplayer))

;; org mode HTML validation removal

(setq org-html-validation-link nil)