summaryrefslogtreecommitdiffstats
path: root/.emacs.d/jd/jd-ui.el
blob: f3a39bc84c3e8e804d9101cb6a3b2ab9e2ba89ff (plain)
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
;; Dotfiles --- Jakub Dlugosz emacs config
;;; Commentary:

;;; Code:

(setq inhibit-startup-message t)
(setq visible-bell t)
(scroll-bar-mode -1)
(tool-bar-mode -1)
(tooltip-mode -1)
(menu-bar-mode -1)
(set-fringe-mode 10)

(set-frame-parameter (selected-frame) 'alpha '(92 . 92))
(add-to-list 'default-frame-alist '(alpha . (92 . 92)))

(custom-set-faces
 '(default ((t (:inherit nil :height 125 :family "Terminus"))))
 '(line-number ((t (:inherit nil :height 125 :family "Terminus"))))
 '(line-number-current-line ((t (:inherit nil :height 125 :family "Terminus")))))

(add-hook 'prog-mode-hook 'menu-bar--display-line-numbers-mode-relative)

(global-set-key (kbd "<escape>") 'keyboard-escape-quit)

(global-prettify-symbols-mode 1)

(defalias 'yes-or-no-p 'y-or-n-p)

(require 'diminish)

(jd/use-package doom-modeline  "emacs-doom-modeline"
		:config
		(doom-modeline-mode))

(jd/use-package solarized-theme  "emacs-solarized-theme"
		:config
		(load-theme 'solarized-dark-high-contrast t))


(jd/use-package diminish "emacs-diminish")

(jd/use-package hl-todo "emacs-hl-todo"
		:init
		(setq hl-todo-keyword-faces
		      '(("TODO"   . "#FF0000")
			("FIXME"  . "#FF0000")
			("DEBUG"  . "#A020F0")))
		:config
		(global-hl-todo-mode 1))

(defun jd/switch-buffer ()
  (interactive)
  (let ((completion-regexp-list '("\\`[^*]"
                                  "\\`\\([^T]\\|T\\($\\|[^A]\\|A\\($\\|[^G]\\|G\\($\\|[^S]\\|S.\\)\\)\\)\\).*")))
    (call-interactively 'counsel-switch-buffer)))

(defvar jd/load-theme-hook nil)
(defun jd/load-theme ()
  (interactive)
  (counsel-load-theme)
  (run-hooks 'jd/load-theme-hook))

(jd/use-package ivy "emacs-ivy"
		:diminish
		:bind
		(("C-s" . swiper))
		:config
		(ivy-mode 1))

(jd/use-package counsel "emacs-counsel"
		:diminish t
		:config
		(counsel-mode 1)

		(jd/leader-key-def
		  "t"  '(:ignore t :which-key "Toggle")
		  "tT" '(toggle-truncate-lines :which-key "Toggle truncate lines")
		  "tt" '(jd/load-theme  :which-key "Choose theme"))

		(jd/leader-key-def
		  "bb" '(jd/switch-buffer :which-key "Buffer switch")
		  "ba" '(counsel-switch-buffer :which-key "Buffer switch")
		  "b"  '(:ignore t :which-key "Buffer")
		  "," '(counsel-switch-buffer :which-key "Buffer switch")))

(jd/use-package which-key "emacs-which-key"
		:diminish
		:config
		(which-key-mode)
		(setq which-key-idle-delay 0.3))

(jd/use-package all-the-icons "emacs-all-the-icons")


(jd/use-package beacon "emacs-beacon"
		:config
		(beacon-mode 1))

(setq display-time-string-forms
      '(" " 24-hours ":" minutes " "))

(when jd/exwm-p
  (display-battery-mode)
  (display-time-mode))
		
(provide 'jd-ui)

;;; jd-ui.el ends here