summaryrefslogtreecommitdiff
path: root/.emacs.d/init.el
blob: 78f8b2587862b61e1642f0ddcf7671f2dfb62575 (about) (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
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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
 ;; init.el

;;; Code:

(require 'package)
(add-to-list 'load-path "~/.emacs.d/lisp/")
(add-to-list 'load-path "/home/apollo/.guix-profile/share/emacs/site-lisp")

(guix-emacs-autoload-packages)
;(require 'vterm)
;(vterm)

(add-hook 'dired-mode-hook 'all-the-icons-dired-mode)

(setq package-archives '(("melpa" . "https://melpa.org/packages/")
			 ("org" . "https://orgmode.org/elpa/")
			 ("elpa" . "https://elpa.gnu.org/packages/")))


(package-initialize)
(unless package-archive-contents
(package-refresh-contents))


(unless (package-installed-p 'use-package)
(package-install 'use-package))

(require 'use-package)

(setq use-package-always-ensure t)
(load "functions.el")
(load "keys.el")
(load "all-the-icons-dired.el")
;(load "anki-editor.el")

;(use-package anki-editor)

(setq inhibit-startup-message nil)

(defvar apollo/default-font-size 130)

(set-face-attribute 'default nil :font "JetBrains Mono" :height 130)


(scroll-bar-mode -1)
(tool-bar-mode -1)
(tooltip-mode -1)
(set-fringe-mode 10)
(menu-bar-mode -1)
(blink-cursor-mode -1)
(menu-bar--visual-line-mode-enable)
;;Visible bell
(setq visible-bell t)




(column-number-mode)
(global-display-line-numbers-mode 0)
(menu-bar--display-line-numbers-mode-relative)
;;Disable line numbers for some modes
(dolist (mode '(pdf-view-mode-hook
		org-mode-hook
		term-mode-hook
		shell-mode-hook
		eshell-mode-hook
		vterm-mode-hook
		elfeed))
  (add-hook mode (lambda () (display-line-numbers-mode 0))))

(set-face-attribute 'default nil
		    :font "JetBrains Mono"
		    :height apollo/default-font-size)

(set-face-attribute 'fixed-pitch nil
		    :font "JetBrains Mono"
		    :height apollo/default-font-size)

(set-face-attribute 'variable-pitch nil
		    :font "JetBrains Mono"
		    :height apollo/default-font-size
		    :weight 'regular)
(use-package all-the-icons
  :ensure t)

;Dashboard settings
;(use-package dashboard
  :config
  (dashboard-setup-startup-hook)

  (setq dashboard-items '((recents  . 5)
                          (bookmarks . 5)))
  (setq initial-buffer-choice (lambda () (get-buffer-create "*dashboard*")))
  (setq dashboard-item-names '(("Recent Files:" . "Recent Files:")
			       ("Bookmarks:" . "Study:")))
  ;; Set the banner
  (setq dashboard-startup-banner "~/dotfiles/pictures/medicine/plague-doctor-s.png")
  ;; Set the title
  (setq dashboard-banner-logo-title "Is that a flying flower?")
  ;; (setq dashboard-init-info "Bring me your sick and wounded!")
  ;; Content is not centered by default. To center, set
  (setq dashboard-set-init-info t)
  (setq dashboard-center-content t)
  (setq dashboard-set-navigator t)
  (setq dashboard-set-heading-icons t)
  (setq dashboard-set-file-icons t)
  (setq dashboard-show-shortcuts nil)
  (setq dashboard-set-footer t)
  (setq dashboard-footer-messages '("Welcome to the Church Of Emacs"))
  (setq dashboard-footer-icon (all-the-icons-octicon "broadcast"
                                                     :height 1.15
                                                     :v-adjust -0.05
                                                     :face 'font-lock-keyword-face))


(defvar eshell-path-env (getenv "~/.local/bin"))
(use-package general)
(use-package doom-themes
  :init (load-theme 'doom-ayu-dark t))


(use-package the-matrix-theme)

(use-package doom-modeline
  :ensure t
  :init (doom-modeline-mode 1)
  :custom ((doom-modeline-height 35)))

(use-package counsel
  :bind (("C-M-j" . 'counsel-switch-buffer)
	 :map minibuffer-local-map
	 ("C-r" . 'counsel-minibuffer-history)
	 ("C-'" . 'counsel-find-file))
  :config
  (counsel-mode 1))

(use-package which-key
  :init (which-key-mode)
  :diminish which-key-mode
  :config
  (setq which-key-idle-delay 0.5)
  )

(use-package ivy
  :diminish
  :bind (("C-s" . swiper)
	 :map ivy-minibuffer-map
	 ("TAB" . ivy-alt-done)
	 ("C-l" . ivy-alt-done)
	 ("C-j" . ivy-next-line)
	 ("C-k" . ivy-previous-line)
	 :map ivy-switch-buffer-map
	 ("C-k" . ivy-previous-line)
	 ("C-l" . ivy-done)
	 ("C-d" . ivy-switch-buffer-kill)
	 :map ivy-reverse-i-search-map
	 ("C-k" . ivy-previous-line)
	 ("C-d" . ivy-reverse-i-search-kill))
  :config
  (ivy-mode 1))

(use-package ivy-rich
  :init
  (ivy-rich-mode 1))

(use-package all-the-icons-ivy-rich
  :ensure t
  :init (all-the-icons-ivy-rich-mode 1))


(use-package helpful
  :custom
  (counsel-describe-function-function #'helpful-callable)
  (counsel-describe-variable-function #'helpful-variable)
  :bind
  ([remap describe-function] . counsel-describe-function)
  ([remap describe-command] . helpful-command)
  ([remap describe-variable] . counsel-describe-variable)
  ([remap describe-key] . helpful-key))

;; (use-package smart-cursor-color
;;   :config
;;   (smart-cursor-color-mode -1))

;; Make ESC quit prompts
  (global-set-key (kbd "<escape>") 'keyboard-escape-quit)

(define-prefix-command 'window)






;;  (apollo/leader-keys
;;     "t" '(:ignore t :which-key "toggles")
;;     "tt" '(counsel-load-theme :which-key "choose theme"))



;; (apollo/leader-keys
;;   "g" '(:ignore t :which-key "Git")
;;   "gs" '(magit-status :which-key "status"))

;; (apollo/leader-keys
;; "f" '(counsel-find-file :which-key "Find File"))

(defun apollo/org-mode-setup ()
  (setq evil-auto-indent nil)
  (apollo/org-theme-dracula))

(use-package org
  :hook (org-mode . apollo/org-mode-setup)
  :config
  (setq org-directory "~/org/"
        org-agenda-files '("~/org/agenda.org"
			   "~/org/med.org")
        org-default-notes-file (expand-file-name "notes.org" org-directory)
        org-ellipsis " ▼ "
        org-log-done 'time
        org-hide-emphasis-markers nil ;change to t to hide emphasis markers
        org-table-convert-region-max-lines 20000
        org-todo-keywords        ; This overwrites the default Doom org-todo-keywords
          '((sequence
             "TODO(t)"           ; A task that is ready to be tackled
             "BLOG(b)"           ; Blog writing assignments
             "GYM(g)"            ; Things to accomplish at the gym
             "WAIT(w)"           ; Something is holding up this task
             "|"                 ; The pipe necessary to separate "active" states and "inactive" states
             "DONE(d)"           ; Task has been completed
             "CANCELLED(c)" )))
  (setq org-agenda-start-log-mode t)
  (setq org-log-done 'time)
  (setq org-log-into-drawer t)
)

;; Use either org-bullets or org-superstar
  ;; (use-package org-bullets
  ;;   :after org
  ;;   :hook (org-mode . org-bullets-mode)
  ;;   :custom
;;   (org-bullets-bullet-list '("●" "○" "●" "○" "●" "●" )))

  ;; (use-package org-superstar
  ;;   :after org
  ;;   :hook (org-mode . org-superstar-mode)
  ;;   :config
  ;;   (setq
  ;;      org-superstar-headline-bullets-list '("◉" "●" "○" "●" "○" "●" "◆")
  ;;      org-superstar-itembullet-alist '((?+ . ?➤) (?- . ?✦))) ; changes +/- symbols in item lists
;;   )

(use-package org-modern
  :after org
  :hook (org-mode . org-modern-mode))

(defun apollo/org-theme-darkone ()
  "My custom org theme for doom themes"
  (interactive)
  (dolist
      (face
       '((org-level-1 1.70 "#51afef" ultra-bold)
         (org-level-2 1.55 "#7FBCD2" extra-bold)
         (org-level-3 1.40 "#da8548" bold)
         (org-level-4 1.20 "#da8548" semi-bold)
         (org-level-5 1.20 "#5699af" normal)
         (org-level-6 1.20 "#a9a1e1" normal)
         (org-level-7 1.10 "#46d9ff" normal)
         (org-level-8 1.00 "#ff6c6b" normal)))
    (set-face-attribute (nth 0 face) nil
			:font "Jetbrains Mono"
			:weight (nth 3 face)
			:height (nth 1 face)
			:foreground (nth 2 face)))
  (set-face-attribute 'org-table nil
		      :font "Jetbrains Mono"
		      :weight 'normal
		      :height 1.0
		      :foreground "#A66CFF"))

(defun apollo/org-theme-dracula ()
  "Enable Dracula theme for Org headers."
  (interactive)
  (dolist
      (face
       '((org-level-1 1.7 "#8be9fd" ultra-bold)
         (org-level-2 1.6 "#bd93f9" extra-bold)
         (org-level-3 1.5 "#50fa7b" bold)
         (org-level-4 1.4 "#ff79c6" semi-bold)
         (org-level-5 1.3 "#9aedfe" normal)
         (org-level-6 1.2 "#caa9fa" normal)
         (org-level-7 1.1 "#5af78e" normal)
         (org-level-8 1.0 "#ff92d0" normal)))
    (set-face-attribute (nth 0 face) nil
			:font "JetBrains Mono"
			:weight (nth 3 face)
			:height (nth 1 face)
			:foreground (nth 2 face)))
  (set-face-attribute 'org-table nil
		      :font "JetBrains Mono"
		      :weight 'normal
		      :height 1.0
		      :foreground "#bfafdf"))

(defun apollo/org-mode-visual ()
    (interactive)
  (setq visual-fill-column-width 100
	visual-fill-column-center-text t)
  (visual-fill-column-mode 1))
(defun apollo/org-mode-visual-undo ()
    (interactive)
  (setq visual-fill-column-width 2000
	visual-fill-column-center-text nil)
  (visual-fill-column-mode 1))

(defadvice org-edit-src-code (around set-buffer-file-name activate compile)
  (let ((file-name (buffer-file-name))) ;; (1)
    ad-do-it                            ;; (2)
    (setq buffer-file-name file-name))) ;; (3)

(use-package visual-fill-column)

(org-babel-do-load-languages
 'org-babel-load-languages
 '((emacs-lisp . t)
   (python . t)))

(require 'org-tempo)
(add-to-list 'org-structure-template-alist '("sh" . "src shell"))
(add-to-list 'org-structure-template-alist '("el" . "src emacs-lisp"))
(add-to-list 'org-structure-template-alist '("py" . "src python"))

;; Automatically tangle our Emacs.org config file when we save it
(defun apollo/org-babel-tangle-config ()
  (when (string-equal (buffer-file-name)
                      (expand-file-name "~/.emacs.d/emacs.org"
					"~/.config/qtile/README.org"))
    ;; Dynamic scoping to the rescue
    (let ((org-confirm-babel-evaluate nil))
      (org-babel-tangle))))

(add-hook 'org-mode-hook (lambda () (add-hook 'after-save-hook #'apollo/org-babel-tangle-config)))


					;Developer

;;Essentials
(electric-pair-mode 1)
(setq sgml-quick-keys 'close)

;;html
;(add-hook 'html-mode-hook #'lsp-deferred)




;;emacs-lisp
(setq tab-always-indent 'complete)
(add-to-list 'completion-styles 'initials t)
(use-package rainbow-delimiters
  :config
  (add-hook 'emacs-lisp-mode-hook #'rainbow-delimiters-mode)
  (add-hook 'scheme-mode-hook #'rainbow-delimiters-mode))


;;instal flyckeck
(use-package flycheck
  :init
  (global-flycheck-mode))
;;Enable globally


;;setup lsp-mode
  (defun apollo/lsp-mode-setup ()
    (setq lsp-headerline-breadcrumb-segments '(path-up-to-project file symbols))
    (lsp-headerline-breadcrumb-mode))

(use-package lsp-mode
  :commands (lsp lsp-deferred)
  :hook (lsp-mode . apollo/lsp-mode-setup)
  :init
  (setq lsp-keymap-prefix "C-c l")  ;; Or 'C-l', 's-l'
  :config
  (lsp-enable-which-key-integration t)
  (setq lsp-pyls-server-command "~/.local/bin/pylsp")
  )

(use-package lsp-ui
  :hook (lsp-mode . lsp-ui-mode)
  :custom
  (lsp-ui-doc-position 'bottom))

;; (use-package dap-node)
;; (use-package dap-mode
;;   ;; Uncomment the config below if you want all UI panes to be hidden by default!
;;   ;; :custom
;;   ;; (lsp-enable-dap-auto-configure nil)
;;   ;; :config
;;   ;; (dap-ui-mode 1)

;;   :config
;;   ;; Set up Node debugging
;;   (require 'dap-node)
;;   (dap-node-setup) ;; Automatically installs Node debug adapter if needed

;;   ;; Bind `C-c l d` to `dap-hydra` for easy access
;;   (general-define-key
;;     :keymaps 'lsp-mode-map
;;     :prefix lsp-keymap-prefix
;;     "d" '(dap-hydra t :wk "debugger")))


(use-package json-mode
    :mode ".json"
    :hook (json-mode . lsp-deferred))


(use-package rjsx-mode
  :mode ".js"
  :hook (rjsx-mode . lsp-deferred)
  :config
  (defadvice js-jsx-indent-line (after js-jsx-indent-line-after-hack activate)
  "Workaround sgml-mode and follow airbnb component style."
  (save-excursion
    (beginning-of-line)
    (if (looking-at-p "^ +\/?> *$")
        (delete-char sgml-basic-offset)))))

;; (use-package ac-html
;;   :mode ".html"
;;   :hook (html-mode . lsp-deferred)
;;   :config
;;     (defadvice js-jsx-indent-line (after js-jsx-indent-line-after-hack activate)
;;   "Workaround sgml-mode and follow airbnb component style."
;;   (save-excursion
;;     (beginning-of-line)
;;     (if (looking-at-p "^ +\/?> *$")
;;         (delete-char sgml-basic-offset)))))

(use-package typescript-mode
:mode ".ts'"
:hook (typescript-mode .lsp-deferred)
:config
(setq typescript-indent-level 2))

(use-package python-mode
    :ensure t
    :mode ".py"
    :hook (python-mode . lsp-deferred)
    :custom
    (dap-python-debugger 'debugpy)
    :config
    (require 'dap-python))

;;autocomplete

  ;;Pyenv
(use-package pyvenv
  :config
  (pyvenv-mode 1))

(use-package company
  :after lsp-mode
  :hook (lsp-mode . company-mode)
  :bind (:map company-active-map
         ("<tab>" . company-complete-selection))
        (:map lsp-mode-map
         ("<tab>" . company-indent-or-complete-common))
  :custom
  (company-minimum-prefix-length 1)
  (company-idle-delay 0.0))

(use-package company-box
  :hook (company-mode . company-box-mode))

(use-package magit
  :custom
  (magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1))



;;elfeed
(use-package elfeed
  :config
  (setq elfeed-search-feed-face ":foreground #fff :weight bold"
        elfeed-feeds (quote
                       (
                        ("https://hackaday.com/blog/feed/" hackaday linux)
                        ("https://opensource.com/feed" opensource linux)
                        ("https://linux.softpedia.com/backend.xml" softpedia linux)
                        ("https://www.thelancet.com/rssfeed/ebiom_current.xml" Lancet ebiom)
                        ("https://www.thelancet.com/rssfeed/lancet_current.xml" Lancet lancet)
                        ("https://www.thelancet.com/rssfeed/ebiom_online.xml" LancetOnline ebiom)
                        ("https://www.thelancet.com/rssfeed/lancet_online.xml" LancetOnline lancet)
                        ("https://www.thelancet.com/rssfeed/lanmic_online.xml" LancetOnline Microbiology)
                        ("https://www.techrepublic.com/rssfeeds/topic/open-source/" techrepublic linu)
                        )))

  )

(use-package elfeed-goodies
  :init
  (elfeed-goodies/setup)
  :config
  (setq elfeed-goodies/entry-pane-size 0.5))

;; (use-package vterm
;;   :config
;;   (setq vterm-shell "/bin/zsh")
;;   :bind(("C-c C-v c" . 'vterm-send-stop)))

(use-package eshell
  :bind (("C-c e" . 'eshell)))

(use-package multi-vterm
  :ensure t
  :bind (("C-c C-v n" . 'multi-vterm-next)
	 ("C-c C-v p" . 'multi-vterm-prev)
	 ("C-c C-v o" . 'multi-vterm)
	 ("C-c C-c" . 'vterm-send-next-key)))
(require 'multi-vterm)
(global-set-key (kbd "C-c C-v n") 'multi-vterm-next)
(global-set-key (kbd "C-c C-v p") 'multi-vterm-prev)
(global-set-key (kbd "C-c C-v o") 'multi-vterm)
(global-set-key (kbd "C-c C-c") 'vterm-send-next-key)

;; (use-package pdf-tools
;;   :init
;;   (pdf-tools-install))

(add-hook 'pdf-view-mode #'pdf-isearch-minor-mode)

;; (use-package eyebrowse
;;   :init
;;   (eyebrowse-mode)
;;   :bind
;;   (("M-`" . eyebrowse-switch-to-window-config-0)
;;    ("M-1" . eyebrowse-switch-to-window-config-1)
;;    ("M-2" . eyebrowse-switch-to-window-config-2)
;;    ("M-3" . eyebrowse-switch-to-window-config-3)
;;    ("M-4" . eyebrowse-switch-to-window-config-4)
;;    ("M-5" . eyebrowse-switch-to-window-config-5)))

(define-key dired-mode-map "b" 'dired-up-directory)
(use-package paredit)
(use-package corfu)
(use-package monkeytype)
;(use-package telega)

(put 'downcase-region 'disabled nil)
(put 'dired-find-alternate-file 'disabled nil)
(put 'set-goal-column 'disabled nil)

;; (use-package treemacs-icons-dired
;;   :config
;;   (add-hook 'dired-mode-hook 'treemacs-icons-dired-mode))

(use-package sudo-edit)


(defun apollo/exwm-init-hook ()
  "Do this upon start."
  (display-battery-mode 0)  ;;Change to 1 to display battery

  (setq display-time-day-and-date t)
  (display-time-mode 1)

  ;;Launch apps that will run in the background
;;  (apollo/run-in-background "blueman-applet")
  (apollo/run-in-background "picom")
;;  (apollo/run-in-background "nm-applet")
  (apollo/emacs-keys)
  (apollo/restore-wallpaper)
  )
  
(defun apollo/exwm-update-class ()
  (exwm-workspace-rename-buffer exwm-class-name))

(use-package exwm
  :config
  (setq exwm-workspace-number 6)
    ;; When window "class" updates, use it to set the buffer name
  (add-hook 'exwm-update-class-hook #'apollo/exwm-update-class)

  ;;When EXWM starts up, run this hook
  (add-hook 'exwm-init-hook #'apollo/exwm-init-hook)
  (start-process-shell-command
   "xrandr" nil "xrandr --output DisplayPort-2 --primary --mode 2560x1440 --pos 1920x0 --rotate normal --output HDMI-A-0 --mode 1920x1080 --pos 0x0 --rotate normal")
  
  ;; Set the screen resolution
  
   (require 'exwm-randr)
   (setq exwm-randr-workspace-output-plist '(1 "DP-1" 2 "HDMI-A-0"))
   (add-hook 'exwm-randr-screen-change-hook
             (lambda ()
               (start-process-shell-command
		"xrandr" nil "xrandr --output DisplayPort-2 --primary --mode 2560x1440 --pos 1920x0 --rotate normal --output HDMI-A-0 --mode 1920x1080 --pos 0x0 --rotate normal" )))
   (exwm-randr-enable)
  

  ;; Load the system tray before exwm-init
  (require 'exwm-systemtray)
  (exwm-systemtray-enable)

  ;; These keys should always pass through to Emacs
  (setq exwm-input-prefix-keys
    '(?\C-x
      ?\C-u
      ?\C-h
      ?\C-w
      ?\M-x
      ?\M-`
      ?\M-&
      ?\M-:
      ?\s-d
      ?\C-\M-j  ;; Buffer list
      ?\C-\ ))  ;; Ctrl+Space

  ;; Ctrl+Q will enable the next key to be sent directly
  (define-key exwm-mode-map [?\C-q] 'exwm-input-send-next-key)

  ;; Set up global key bindings.  These always work, no matter the input state!
  ;; Keep in mind that changing this list after EXWM initializes has no effect.
  (setq exwm-input-global-keys
        `(
          ;; Reset to line-mode (C-c C-k switches to char-mode via exwm-input-release-keyboard)
          ([?\s-r] . exwm-reset)

          ;; Move between windows
;          ([s-up] . windmove-up)
;          ([s-down] . windmove-down)

          ;; Launch applications via shell command
          ([?\s-&] . (lambda (command)
                       (interactive (list (read-shell-command "$ ")))
                       (start-process-shell-command command nil command)))

          ;; Switch workspace
          ([?\s-e] . exwm-workspace-switch)
          ([?\s-`] . (lambda () (interactive) (exwm-workspace-switch-create 0)))
          ([?\s-1] . (lambda () (interactive) (exwm-workspace-switch-create 1)))
          ([?\s-2] . (lambda () (interactive) (exwm-workspace-switch-create 2)))
          ([?\s-3] . (lambda () (interactive) (exwm-workspace-switch-create 3)))
          ([?\s-4] . (lambda () (interactive) (exwm-workspace-switch-create 4)))

          ,@(mapcar (lambda (i)
                      `(,(kbd (format "s-%d" i)) .
                        (lambda ()
                          (interactive)
                          (exwm-workspace-switch-create ,i))))
                    (number-sequence 0 9))))
  
  (defun exwm-enlarge-horizontally-50 ()
    (interactive)
    (exwm-layout-enlarge-window-horizontally 50))

  (defun exwm-shrink-horizontally-50 ()
    "Shrink window horizontally by 10"
     (interactive)
     (exwm-layout-shrink-window-horizontally 50))

  (defun exwm-shrink-vertically-50 ()
    "Shrink window by 50."
    (interactive)
    (exwm-layout-shrink-window 50))

  (defun exwm-enlarge-vertically-50 ()
    "Enlarge window by 50."
    (interactive)
    (exwm-layout-enlarge-window 50))

  (exwm-input-set-key (kbd "C-c d") 'dmenu)
  (exwm-input-set-key (kbd "s-<tab>") 'rofi)
  (exwm-input-set-key (kbd "s-Q") 'kill-emacs)
  (exwm-input-set-key (kbd "<XF86AudioRaiseVolume>") 'apollo/volume-increase)
  (exwm-input-set-key (kbd "<XF86AudioLowerVolume>") 'apollo/volume-decrease)
  (exwm-input-set-key (kbd "s-0") 'apollo/emacs-keys)
  (exwm-input-set-key (kbd "s-9") 'apollo/greek-keyboard)
  (exwm-input-set-key (kbd "C-w C-<left>") 'exwm-shrink-horizontally-50)
  (exwm-input-set-key (kbd "C-w C-<right>") 'exwm-enlarge-horizontally-50)
  (exwm-input-set-key (kbd "C-w C-<up>") 'exwm-shrink-vertically-50)
  (exwm-input-set-key (kbd "C-w C-<up>") 'exwm-enlarge-vertically-50)
  
  (exwm-enable))

;;Transparency
(set-frame-parameter (selected-frame) 'alpha '(90 90))
(add-to-list 'default-frame-alist '(alpha 90 90))

;;Follow focus using exwm-mff
(use-package exwm-mff
  :init
  (exwm-mff-mode))





(use-package exwm-firefox-core
  :ensure t)
(use-package exwm-firefox-evil
  :ensure t)

(use-package consult
  :ensure t
  :bind(("M-g g" . consult-goto-line)))

(use-package alsamixer
  :ensure t)

(use-package simple-httpd
  :ensure t)

(use-package circe
  :ensure t
  :config
  (setq circe-network-options
	'(("Libera Chat"
	   :tls t
	   :nick "apo11o"
	   :sasl-username "apo11o"
	   :sasl-password libera-pass))))

(use-package eshell-syntax-highlighting
  :ensure t
  :config
  (eshell-syntax-highlighting-global-mode))

(use-package pdf-tools
  :ensure t)

(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.
 '(auth-source-save-behavior nil)
 '(custom-safe-themes
   '("2f8eadc12bf60b581674a41ddc319a40ed373dd4a7c577933acaff15d2bf7cc6" "7e377879cbd60c66b88e51fad480b3ab18d60847f31c435f15f5df18bdb18184" "991ca4dbb23cab4f45c1463c187ac80de9e6a718edc8640003892a2523cb6259" "5b9a45080feaedc7820894ebbfe4f8251e13b66654ac4394cb416fef9fdca789" "ae426fc51c58ade49774264c17e666ea7f681d8cae62570630539be3d06fd964" "4fda8201465755b403a33e385cf0f75eeec31ca8893199266a6aeccb4adedfa4" "da75eceab6bea9298e04ce5b4b07349f8c02da305734f7c0c8c6af7b5eaa9738" "2853dd90f0d49439ebd582a8cbb82b9b3c2a02593483341b257f88add195ad76" "570263442ce6735821600ec74a9b032bc5512ed4539faf61168f2fdf747e0668" "8d8207a39e18e2cc95ebddf62f841442d36fcba01a2a9451773d4ed30b632443" "251ed7ecd97af314cd77b07359a09da12dcd97be35e3ab761d4a92d8d8cf9a71" "d824f0976625bb3bb38d3f6dd10b017bdb4612f27102545a188deef0d88b0cd9" "fa1b2c364b1d058d0611caa5f5c9b2e8cdd0eca519ef88af2de2a2728bbf8070" "803aaddee599b43da31fb0fd8fae0fa58b4ef7617c673f07201e3463a3099957" "21055a064d6d673f666baaed35a69519841134829982cbbb76960575f43424db" "2c613514f52fb56d34d00cc074fe6b5f4769b4b7f0cc12d22787808addcef12c" "3325e2c49c8cc81a8cc94b0d57f1975e6562858db5de840b03338529c64f58d1" "512ce140ea9c1521ccaceaa0e73e2487e2d3826cc9d287275550b47c04072bc4" "6945dadc749ac5cbd47012cad836f92aea9ebec9f504d32fe89a956260773ca4" "05626f77b0c8c197c7e4a31d9783c4ec6e351d9624aa28bc15e7f6d6a6ebd926" "49acd691c89118c0768c4fb9a333af33e3d2dca48e6f79787478757071d64e68" "60ada0ff6b91687f1a04cc17ad04119e59a7542644c7c59fc135909499400ab8" "545ab1a535c913c9214fe5b883046f02982c508815612234140240c129682a68" "ce4234c32262924c1d2f43e6b61312634938777071f1129c7cde3ebd4a3028da" "c865644bfc16c7a43e847828139b74d1117a6077a845d16e71da38c8413a5aaa" "680f62b751481cc5b5b44aeab824e5683cf13792c006aeba1c25ce2d89826426" "631c52620e2953e744f2b56d102eae503017047fb43d65ce028e88ef5846ea3b" "2dd4951e967990396142ec54d376cced3f135810b2b69920e77103e0bcedfba9" "a138ec18a6b926ea9d66e61aac28f5ce99739cf38566876dc31e29ec8757f6e2" "683b3fe1689da78a4e64d3ddfce90f2c19eb2d8ab1bab1738a63d8263119c3f4" "2dc03dfb67fbcb7d9c487522c29b7582da20766c9998aaad5e5b63b5c27eec3f" "830596655dc39879096d9b7772768de6042fb5a4293c6b90c98a9b98bce96e4a" "7dc296b80df1b29bfc4062d1a66ee91efb462d6a7a934955e94e786394d80b71" "0ce768d3ea6d809292d12b22a5ff6de65e24a8d527e4e0885cf87640f42dff7d" "02f57ef0a20b7f61adce51445b68b2a7e832648ce2e7efb19d217b6454c1b644" "e3daa8f18440301f3e54f2093fe15f4fe951986a8628e98dcd781efbec7a46f2" "5586a5db9dadef93b6b6e72720205a4fa92fd60e4ccfd3a5fa389782eab2371b" "1aa4243143f6c9f2a51ff173221f4fd23a1719f4194df6cef8878e75d349613d" "7a4784fc0c0c853c578132e81a757a0f9b3e675fdd7e56303f3ee1fb8d7ae2a3" "8d3ef5ff6273f2a552152c7febc40eabca26bae05bd12bc85062e2dc224cde9a" "aec7b55f2a13307a55517fdf08438863d694550565dee23181d2ebd973ebd6b8" "7a424478cb77a96af2c0f50cfb4e2a88647b3ccca225f8c650ed45b7f50d9525" "944d52450c57b7cbba08f9b3d08095eb7a5541b0ecfb3a0a9ecd4a18f3c28948" "3199be8536de4a8300eaf9ce6d864a35aa802088c0925e944e2b74a574c68fd0" "443e2c3c4dd44510f0ea8247b438e834188dc1c6fb80785d83ad3628eadf9294" "554c2be54aecbbd3a6317906ada2e8f25f50f8d6bf3d9c22e3b30e3700d0bbd1" "5f128efd37c6a87cd4ad8e8b7f2afaba425425524a68133ac0efd87291d05874" "bf948e3f55a8cd1f420373410911d0a50be5a04a8886cabe8d8e471ad8fdba8e" "fb2c27e7ad4a81c2f57bceeca0faeb1c84fb7a167c097b998e2a1ea314455fd6" "47f3e55e4e3d570d5513d4cc58047dc059bd6ab3d135c796c4ccbfb77d4eb88b" "1070069a4671554a2c00b8375485896c1aa8144f5b8d99b86845069351770ee9" "e8483bc21cf667971eabdbb01203e3a471de1b59a4e532368b7a20f5665d686a" "b7bf7b95fb796614f0b36a7c4906a93db75ad0c6146f336c7ed085f6fceef93d" "05b767a3f3a37ac46353fd88f194934d82eb6c3644c3b8da883752f57513e7aa" default))
 '(package-selected-packages
   '(exwm-firefox-evil exwm-evil-firefox eshell-syntax-highlighting simple-httpd simplte-httpd greek-polytonic darktooth-theme org-drill circe rcirc-color lsp-scheme emms dashboard pdf-tools desktop-environment which-key use-package typescript-mode the-matrix-theme telega sudo-edit rjsx-mode rainbow-delimiters pyvenv python-mode paredit org-superstar org-modern monkeytype magit lsp-ui json-mode helpful general flycheck exwm-mff exwm-firefox-core elfeed-goodies doom-themes doom-modeline dap-mode counsel corfu consult company-box alsamixer all-the-icons-ivy-rich)))

(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.
 )
(put 'upcase-region 'disabled nil)