add app launcher and fullscreen

This commit is contained in:
Sakooooo 2024-02-08 09:41:34 +04:00
parent be0dd7387e
commit a76167e432
Signed by: sako
GPG key ID: 3FD715D87D7725E0

View file

@ -308,52 +308,54 @@ Cause emacs overlay lol
#+end_src #+end_src
** Command Autocompletion Packages ** Command Autocompletion Packages
#+begin_src emacs-lisp #+begin_src emacs-lisp
;; better search ;; better search
(use-package swiper (use-package swiper
)
;; better commands
(use-package counsel
) )
;; autocompletion on commands (?) ;; better commands
(use-package ivy (use-package counsel
:diminish :custon
:bind (("C-s" . swiper) (counsel-linux-app-format-function #'counsel-linux-app-format-function-name-only)
:map ivy-minibuffer-map )
("TAB" . ivy-alt-done) ;; autocompletion on commands (?)
("C-l" . ivy-alt-done) (use-package ivy
("C-j" . ivy-next-line) :diminish
("C-k" . ivy-previous-line) :bind (("C-s" . swiper)
:map ivy-switch-buffer-map :map ivy-minibuffer-map
("C-k" . ivy-previous-line) ("TAB" . ivy-alt-done)
("C-l" . ivy-done) ("C-l" . ivy-alt-done)
("C-d" . ivy-switch-buffer-kill) ("C-j" . ivy-next-line)
:map ivy-reverse-i-search-map ("C-k" . ivy-previous-line)
("C-k" . ivy-previous-line) :map ivy-switch-buffer-map
("C-d" . ivy-reverse-i-search-kill)) ("C-k" . ivy-previous-line)
:demand ("C-l" . ivy-done)
:config ("C-d" . ivy-switch-buffer-kill)
(ivy-mode 1)) :map ivy-reverse-i-search-map
;; better ivy autocompletion ("C-k" . ivy-previous-line)
(use-package ivy-rich ("C-d" . ivy-reverse-i-search-kill))
:init :demand
(ivy-rich-mode 1)) :config
(ivy-mode 1))
;; better ivy autocompletion
(use-package ivy-rich
:init
(ivy-rich-mode 1))
;; ivy in the middle ;; ivy in the middle
(use-package ivy-posframe (use-package ivy-posframe
:init :init
(setq ivy-posframe-display-functions-alist '((t . ivy-posframe-display-at-frame-center))) (setq ivy-posframe-display-functions-alist '((t . ivy-posframe-display-at-frame-center)))
:config :config
(ivy-posframe-mode 1)) (ivy-posframe-mode 1))
;; counsel M+X ;; counsel M+X
(use-package counsel (use-package counsel
:bind (("M-x" . counsel-M-x) :bind (("M-x" . counsel-M-x)
("C-x b" . counsel-ibuffer) ("C-x b" . counsel-ibuffer)
("C-x C-f" . counsel-find-file) ("C-x C-f" . counsel-find-file)
:map minibuffer-local-map :map minibuffer-local-map
("C-r" . 'counsel-minibuffer-history)) ("C-r" . 'counsel-minibuffer-history))
:config :config
(setq ivy-inital-inputs-alist nil)) (setq ivy-inital-inputs-alist nil))
#+end_src #+end_src
** Custom Themes ** Custom Themes
#+begin_src emacs-lisp #+begin_src emacs-lisp
@ -1314,113 +1316,117 @@ Aint no way bro
** EXWM ** EXWM
RELEASE ME RELEASE ME
#+begin_src emacs-lisp #+begin_src emacs-lisp
(when (eq system-type 'gnu/linux) (when (eq system-type 'gnu/linux)
(display-battery-mode) (display-battery-mode)
(use-package exwm (use-package exwm
:config :config
;; background ;; background
(add-hook 'exwm-init-hook (lambda () ;; todo turn this info a function
;; background (add-hook 'exwm-init-hook (lambda ()
(call-process-shell-command "feh --bg-fill ~/background.png" nil 0) ;; background
(call-process-shell-command "~/.config/polybar/startpolybar" nil 0) (call-process-shell-command "feh --bg-fill ~/background.png" nil 0)
(call-process-shell-command "~/.config/picom/startpicom" nil 0) (call-process-shell-command "~/.config/polybar/startpolybar" nil 0)
;; startup (call-process-shell-command "~/.config/picom/startpicom" nil 0)
(call-process-shell-command "nm-applet" nil 0) ;; startup
(call-process-shell-command "blueman-applet" nil 0) (call-process-shell-command "nm-applet" nil 0)
(call-process-shell-command "nextcloud" nil 0) (call-process-shell-command "blueman-applet" nil 0)
(call-process-shell-command "bitwarden" nil 0) (call-process-shell-command "nextcloud" nil 0)
(call-process-shell-command "flameshot" nil 0) (call-process-shell-command "bitwarden" nil 0)
)) (call-process-shell-command "flameshot" nil 0)
;; startup ))
;; workspaces ;; startup
(setq exwm-workspace-number 5) ;; workspaces
(setq exwm-workspace-number 5)
(require 'exwm-systemtray) (require 'exwm-systemtray)
(exwm-systemtray-enable) (exwm-systemtray-enable)
;; polybar ;; polybar
(defvar sakomacs/polybar-process nil (defvar sakomacs/polybar-process nil
"Holds the process of the running Polybar instance, if any") "Holds the process of the running Polybar instance, if any")
(server-start) (server-start)
(defun sakomacs/kill-panel () (defun sakomacs/kill-panel ()
(interactive) (interactive)
(when sakomacs/polybar-process (when sakomacs/polybar-process
(ignore-errors (ignore-errors
(kill-process sakomacs/polybar-process))) (kill-process sakomacs/polybar-process)))
(setq sakomacs/polybar-process nil)) (setq sakomacs/polybar-process nil))
(defun sakomacs/start-panel () (defun sakomacs/start-panel ()
(interactive) (interactive)
(sakomacs/kill-panel) (sakomacs/kill-panel)
(setq sakomacs/polybar-process (start-process-shell-command "polybar" nil "polybar panel"))) (setq sakomacs/polybar-process (start-process-shell-command "polybar" nil "polybar panel")))
(defun sakomacs/send-polybar-hook (module-name hook-index) (defun sakomacs/send-polybar-hook (module-name hook-index)
(start-process-shell-command "polybar-msg" nil (format "polybar-msg hook %s %s" module-name hook-index))) (start-process-shell-command "polybar-msg" nil (format "polybar-msg hook %s %s" module-name hook-index)))
(defun sakomacs/send-polybar-exwm-workspace () (defun sakomacs/send-polybar-exwm-workspace ()
(sakomacs/send-polybar-hook "exwm-workspace" 1)) (sakomacs/send-polybar-hook "exwm-workspace" 1))
;; Update panel indicator when workspace changes ;; Update panel indicator when workspace changes
(add-hook 'exwm-workspace-switch-hook #'sakomacs/send-polybar-exwm-workspace) (add-hook 'exwm-workspace-switch-hook #'sakomacs/send-polybar-exwm-workspace)
;; always use these keys in emacs ;; always use these keys in emacs
(setq exwm-input-prefix-keys (setq exwm-input-prefix-keys
'(?\C-x '(?\C-x
?\C-u ?\C-u
?\C-h ?\C-h
?\M-x ?\M-x
?\M-` ?\M-`
?\M-& ?\M-&
?\M-: ?\M-:
?\C-\M-j ;; Buffer list ?\C-\M-j ;; Buffer list
?\C-\ )) ;; Ctrl+Space ?\C-\ )) ;; Ctrl+Space
;; Ctrl+Q will enable the next key to be sent directly ;; Ctrl+Q will enable the next key to be sent directly
(define-key exwm-mode-map [?\C-q] 'exwm-input-send-next-key) (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! ;; app launcher and fullscreen
;; Keep in mind that changing this list after EXWM initializes has no effect. (exwm-input-set-key (kbd "s-SPC") 'counsel-linux-app)
(setq exwm-input-global-keys (exwm-input-set-key (kbd "s-f") 'exwm-layout-toggle-fullscreen)
`( ;; Set up global key bindings. These always work, no matter the input state!
;; Reset to line-mode (C-c C-k switches to char-mode via exwm-input-release-keyboard) ;; Keep in mind that changing this list after EXWM initializes has no effect.
([?\s-r] . exwm-reset) (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 ;; Move between windows
([s-left] . windmove-left) ([s-left] . windmove-left)
([s-right] . windmove-right) ([s-right] . windmove-right)
([s-up] . windmove-up) ([s-up] . windmove-up)
([s-down] . windmove-down) ([s-down] . windmove-down)
;; Launch applications via shell command ;; Launch applications via shell command
([?\s-&] . (lambda (command) ([?\s-&] . (lambda (command)
(interactive (list (read-shell-command "$ "))) (interactive (list (read-shell-command "$ ")))
(start-process-shell-command command nil command))) (start-process-shell-command command nil command)))
;; Switch workspace ;; Switch workspace
([?\s-w] . exwm-workspace-switch) ([?\s-w] . exwm-workspace-switch)
;; 's-N': Switch to certain workspace with Super (Win) plus a number key (0 - 9)
,@(mapcar (lambda (i)
`(,(kbd (format "s-%d" i)) .
(lambda ()
(interactive)
(exwm-workspace-switch-create ,i))))
(number-sequence 0 9))))
)
(use-package desktop-environment
:after exwm
:config (desktop-environment-mode)
:custom
(desktop-environment-brightness-small-increment "2%+")
(desktop-environment-brightness-small-decrement "2%-")
(desktop-environment-brightness-normal-increment "5%+")
(desktop-environment-brightness-normal-decrement "5%-"))
;; 's-N': Switch to certain workspace with Super (Win) plus a number key (0 - 9)
,@(mapcar (lambda (i)
`(,(kbd (format "s-%d" i)) .
(lambda ()
(interactive)
(exwm-workspace-switch-create ,i))))
(number-sequence 0 9))))
) )
(use-package desktop-environment
:after exwm
:config (desktop-environment-mode)
:custom
(desktop-environment-brightness-small-increment "2%+")
(desktop-environment-brightness-small-decrement "2%-")
(desktop-environment-brightness-normal-increment "5%+")
(desktop-environment-brightness-normal-decrement "5%-"))
)
#+end_src #+end_src
* Org Mode Configuration Setup * Org Mode Configuration Setup
** Babel Languages ** Babel Languages