-
Notifications
You must be signed in to change notification settings - Fork 1
/
old.init.el
138 lines (130 loc) · 5.52 KB
/
old.init.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
;;; package --- Summary
;;; Commentary:
;;; Code:
(defun load-history-filename-element (file-regexp)
(let* ((loads load-history)
(load-elt (and loads (car loads))))
(save-match-data
(while (and loads
(or (null (car load-elt))
(not (stringp (car load-elt)))
(not (string-match file-regexp (car load-elt)))))
(setq loads (cdr loads)
load-elt (and loads (car loads)))))
load-elt))
(require 'package)
(add-to-list 'package-archives
'("melpa" . "https://melpa.org/packages/"))
(package-refresh-contents)
(package-initialize)
(unless (package-installed-p 'use-package)
(package-install 'use-package))
(use-package exwm ;; require xelb
:ensure t
:config
(require 'exwm)
(require 'exwm-config)
(exwm-config-example)
(require 'exwm-systemtray)
(exwm-systemtray-enable))
(use-package selectrum ;; completing-read are provided by consult.
:ensure t
:config
'(selectrum-mode))
(use-package counsel
:ensure t
:init
(counsel-mode))
(use-package which-key ;;
:ensure t
:config
(which-key-setup-side-window-right)
;; (which-key-setup-minibuffer)
;; (setq which-key-popup-type 'side-window)
(which-key-mode))
(use-package dmenu ;; require nadvice-0.3
:ensure t
:init )
(load-theme 'manoj-dark 1)
(display-time-mode 1)
(global-visual-line-mode 1)
(global-hl-line-mode 1)
(scroll-bar-mode -1)
(tool-bar-mode -1)
(tooltip-mode -1)
(set-fringe-mode 1)
(menu-bar-mode -1)
;; (auto-save-mode 1)
(global-set-key (kbd "C-x C-b") 'buffer-menu-other-window) ;; open the buffer-list menu in another window
(global-set-key (kbd "C-x r") 'browse-kill-ring) ;; open all the saved clipboard stuff buffer
(global-set-key (kbd "C-y") 'yank) ;; paste
(global-set-key (kbd "C-w") 'kill-region) ;; cut
(global-set-key (kbd "M-w") 'kill-ring-save) ;; copy
(global-set-key (kbd "C-x u") 'undo) ;; undo
(global-set-key (kbd "C-x s") 'exwm-input-send-next-key) ;; send command to the external window
(global-set-key (kbd "C-x d") 'dmenu)
(global-set-key (kbd "C-s") 'ctrlf-forward-default) ;; find word. isearch
(global-set-key (kbd "C-x t") 'erc-track-switch-buffer) ;; go to irc channel with new message
(global-set-key (kbd "C-x C-z") 'other-window) ;; switch to the next buffer
(global-set-key (kbd "C-x 0") 'delete-window) ;; remove the current window. does not kill/delete the window
(global-set-key (kbd "C-x 1") 'delete-other-windows) ;; remove all the other windows
(global-set-key (kbd "C-x C-k") 'kill-this-buffer) ;; this kill/delete the window
(global-set-key (kbd "C-x b") 'eww) ;; open the eww browser
(global-set-key (kbd "C-x C-a") 'next-buffer)
(global-set-key (kbd "C-x C-d") 'previous-buffer)
;;(global-set-key (kbd "C-x <down>") 'rotate-frame-clockwise) ;; require transpose-frame
(global-set-key (kbd "C-g") 'keyboard-quit) ;; quit/ close minibuffer stuff
(global-set-key (kbd "C-SPC") 'set-mark-command) ;; set mark | "C-SPC SPC" to cancel set mark
(global-set-key (kbd "M-x") 'counsel-M-x) ;; Open the execute-command minibuffer.
(global-set-key (kbd "C-x C-v") 'counsel-switch-buffer-other-window)
(global-set-key (kbd "C-x C-c") 'ibuffer) ;; counsel-switch-buffer, ibuffer
(global-set-key (kbd "<f5>") (lambda() (interactive)(load-file "~/.emacs.d/init.el")))
(global-set-key (kbd "<f6>") (lambda() (interactive)(find-file "~/.emacs.d/init.el")))
(global-set-key (kbd "<f7>") (lambda() (interactive)(find-file "/home/danrobi")))
(global-set-key (kbd "<f8>") (lambda() (interactive)(find-file "/media/danrobi/1tbstorage/FilesTransferFolder")))
(defun qtox.sh ()
(interactive)
(async-shell-command "/home/danrobi/.local/bin/./qtox.sh &"))
;; Personal Prefix-Command (kbd "C-z")
(define-prefix-command 'z-map)
(global-set-key (kbd "C-z") 'z-map)
(define-key 'z-map (kbd "s") 'bookmark-set)
(define-key 'z-map (kbd "j") 'bookmark-jump)
(define-key 'z-map (kbd "d") 'bookmark-delete)
(global-set-key (kbd "C-x e") 'elfeed) ;; open elfeed
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(auto-save-visited-mode t)
'(display-time-day-and-date t)
'(dmenu-prompt-string "Dmenu: ")
'(exec-path
'("/usr/local/bin" "/usr/bin" "/bin" "/usr/local/games" "/usr/games" "/usr/lib/emacs/27.1/x86_64-linux-gnu" "/home/danrobi/.local/bin"))
'(global-hl-line-mode t)
'(global-visual-line-mode t)
'(ibuffer-always-show-last-buffer :nomini)
'(ibuffer-use-other-window nil)
'(ido-max-window-height 0.5)
'(ivy-fixed-height-minibuffer t)
'(ivy-height 30)
'(line-number-mode nil)
'(max-mini-window-height 0.5)
'(mode-line-percent-position '(6 "%q"))
'(package-selected-packages
'(selectrum-prescient dmenu which-key use-package selectrum exwm emojify elpher dashboard ctrlf counsel browse-kill-ring))
'(selectrum-fix-vertical-window-height t)
'(selectrum-max-window-height 30)
'(selectrum-mode t)
'(which-key-mode t)
'(which-key-side-window-max-height 0.5)
'(which-key-side-window-max-width 0.5))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(mode-line ((t (:background "blue violet" :foreground "snow" :box nil :weight bold :height 0.9))))
'(mode-line-buffer-id ((t (:background "blue violet" :foreground "snow" :weight ultra-light :height 0.9))))
'(mode-line-inactive ((t (:background "black" :foreground "snow" :box nil :weight ultra-light :height 0.9)))))