masssssive update lol
This commit is contained in:
parent
1c8091ad65
commit
933cc6348d
36 changed files with 658 additions and 1856 deletions
|
@ -1,349 +0,0 @@
|
|||
(beacon-mode 1)
|
||||
|
||||
(map! :leader
|
||||
(:prefix ("b". "buffer")
|
||||
:desc "List bookmarks" "L" #'list-bookmarks
|
||||
:desc "Save current bookmarks to bookmark file" "w" #'bookmark-save))
|
||||
|
||||
(global-auto-revert-mode 1)
|
||||
(setq global-auto-revert-non-file-buffers t)
|
||||
|
||||
(evil-define-key 'normal ibuffer-mode-map
|
||||
(kbd "f c") 'ibuffer-filter-by-content
|
||||
(kbd "f d") 'ibuffer-filter-by-directory
|
||||
(kbd "f f") 'ibuffer-filter-by-filename
|
||||
(kbd "f m") 'ibuffer-filter-by-mode
|
||||
(kbd "f n") 'ibuffer-filter-by-name
|
||||
(kbd "f x") 'ibuffer-filter-disable
|
||||
(kbd "g h") 'ibuffer-do-kill-lines
|
||||
(kbd "g H") 'ibuffer-update)
|
||||
|
||||
;; https://stackoverflow.com/questions/9547912/emacs-calendar-show-more-than-3-months
|
||||
(defun drk/year-calendar (&optional year)
|
||||
(interactive)
|
||||
(require 'calendar)
|
||||
(let* (
|
||||
(current-year (number-to-string (nth 5 (decode-time (current-time)))))
|
||||
(month 0)
|
||||
(year (if year year (string-to-number (format-time-string "%Y" (current-time))))))
|
||||
(switch-to-buffer (get-buffer-create calendar-buffer))
|
||||
(when (not (eq major-mode 'calendar-mode))
|
||||
(calendar-mode))
|
||||
(setq displayed-month month)
|
||||
(setq displayed-year year)
|
||||
(setq buffer-read-only nil)
|
||||
(erase-buffer)
|
||||
;; horizontal rows
|
||||
(dotimes (j 4)
|
||||
;; vertical columns
|
||||
(dotimes (i 3)
|
||||
(calendar-generate-month
|
||||
(setq month (+ month 1))
|
||||
year
|
||||
;; indentation / spacing between months
|
||||
(+ 5 (* 25 i))))
|
||||
(goto-char (point-max))
|
||||
(insert (make-string (- 10 (count-lines (point-min) (point-max))) ?\n))
|
||||
(widen)
|
||||
(goto-char (point-max))
|
||||
(narrow-to-region (point-max) (point-max)))
|
||||
(widen)
|
||||
(goto-char (point-min))
|
||||
(setq buffer-read-only t)))
|
||||
|
||||
(defun drk/scroll-year-calendar-forward (&optional arg event)
|
||||
"Scroll the yearly calendar by year in a forward direction."
|
||||
(interactive (list (prefix-numeric-value current-prefix-arg)
|
||||
last-nonmenu-event))
|
||||
(unless arg (setq arg 0))
|
||||
(save-selected-window
|
||||
(if (setq event (event-start event)) (select-window (posn-window event)))
|
||||
(unless (zerop arg)
|
||||
(let* (
|
||||
(year (+ displayed-year arg)))
|
||||
(drk/year-calendar year)))
|
||||
(goto-char (point-min))
|
||||
(run-hooks 'calendar-move-hook)))
|
||||
|
||||
(defun drk/scroll-year-calendar-backward (&optional arg event)
|
||||
"Scroll the yearly calendar by year in a backward direction."
|
||||
(interactive (list (prefix-numeric-value current-prefix-arg)
|
||||
last-nonmenu-event))
|
||||
(drk/scroll-year-calendar-forward (- (or arg 1)) event))
|
||||
|
||||
(map! :leader
|
||||
:desc "Scroll year calendar backward" "<left>" #'drk/scroll-year-calendar-backward
|
||||
:desc "Scroll year calendar forward" "<right>" #'drk/scroll-year-calendar-forward)
|
||||
|
||||
(defalias 'year-calendar 'drk/year-calendar)
|
||||
|
||||
(map! :leader
|
||||
(:prefix ("c h" . "Help info from Clippy")
|
||||
:desc "Clippy describes function under point" "f" #'clippy-describe-function
|
||||
:desc "Clippy describes variable under point" "v" #'clippy-describe-variable))
|
||||
|
||||
(require 'dap-netcore)
|
||||
(require 'dap-dlv-go)
|
||||
(map! :leader
|
||||
(:prefix ("d" . "dap-mode")
|
||||
:desc "Toggle breakpoint" "t" #'dap-breakpoint-toggle
|
||||
:desc "Continue execution" "c" #'dap-continue
|
||||
:desc "Step in" "n" #'dap-step-in
|
||||
:desc "Step out" "N" #'dap-step-out
|
||||
:desc "See all breakpoints" "b" #'dap-ui-breakpoints-toggle
|
||||
:desc "Change variable value" "s" #'dap-ui-set-variable-value
|
||||
:desc "Evaluate expression at point" "e" #'dap-eval-thing-at-point
|
||||
:desc "Evaluate expression" "E" #'dap-eval
|
||||
:desc "Run debugger" "r" #'dap-debug
|
||||
:desc "Restart debugger" "R" #'dap-debug-restart
|
||||
:desc "Stop debugger" "d" #'dap-disconnect))
|
||||
(use-package dap-mode
|
||||
:init
|
||||
(dap-auto-configure-mode)
|
||||
|
||||
:custom
|
||||
(dap-netcore-download-url "https://github.com/Samsung/netcoredbg/releases/download/3.1.0-1031/netcoredbg-linux-amd64.tar.gz"))
|
||||
|
||||
;; With dired-open plugin, you can launch external programs for certain
|
||||
;; extensions For example, I set all .png files to open in 'vimiv' and all .mp4
|
||||
;; files to open in 'mpv'
|
||||
(setq dired-open-extensions '(("gif" . "vimiv")
|
||||
("jpg" . "vimiv")
|
||||
("png" . "vimiv")
|
||||
("mkv" . "mpv")
|
||||
("mp3" . "mpv")
|
||||
("mp4" . "mpv")))
|
||||
|
||||
(evil-define-key 'normal peep-dired-mode-map
|
||||
(kbd "j") 'peep-dired-next-file
|
||||
(kbd "k") 'peep-dired-prev-file)
|
||||
(add-hook 'peep-dired-hook 'evil-normalize-keymaps)
|
||||
|
||||
(setq delete-by-moving-to-trash t
|
||||
trash-directory "~/.local/share/Trash/files/")
|
||||
|
||||
(setq doom-theme 'doom-gruvbox)
|
||||
(map! :leader
|
||||
:desc "Load new theme" "h t" #'load-theme)
|
||||
|
||||
(use-package emojify
|
||||
:hook (after-init . global-emojify-mode))
|
||||
|
||||
(setq doom-font (font-spec :family "Mononoki Nerd Font" :size 18)
|
||||
doom-variable-pitch-font (font-spec :family "Mononoki Nerd Font" :size 18)
|
||||
doom-big-font (font-spec :family "Mononoki Nerd Font" :size 24))
|
||||
(after! doom-themes
|
||||
(setq doom-themes-enable-bold t
|
||||
doom-themes-enable-italic t))
|
||||
(custom-set-faces!
|
||||
'(font-lock-comment-face :slant italic)
|
||||
'(font-lock-keyword-face :slant italic))
|
||||
|
||||
(defun drk/insert-todays-date (prefix)
|
||||
(interactive "P")
|
||||
(let ((format (cond
|
||||
((not prefix) "%A, %B %d, %Y")
|
||||
((equal prefix '(4)) "%m-%d-%Y")
|
||||
((equal prefix '(16)) "%Y-%m-%d"))))
|
||||
(insert (format-time-string format))))
|
||||
|
||||
(require 'calendar)
|
||||
(defun drk/insert-any-date (date)
|
||||
"Insert DATE using the current locale."
|
||||
(interactive (list (calendar-read-date)))
|
||||
(insert (calendar-date-string date)))
|
||||
|
||||
(map! :leader
|
||||
(:prefix ("i d" . "Insert date")
|
||||
:desc "Insert any date" "a" #'drk/insert-any-date
|
||||
:desc "Insert todays date" "t" #'drk/insert-todays-date))
|
||||
|
||||
(setq ivy-posframe-display-functions-alist
|
||||
'((swiper . ivy-posframe-display-at-point)
|
||||
(complete-symbol . ivy-posframe-display-at-point)
|
||||
(counsel-M-x . ivy-display-function-fallback)
|
||||
(counsel-esh-history . ivy-posframe-display-at-window-center)
|
||||
(counsel-describe-function . ivy-display-function-fallback)
|
||||
(counsel-describe-variable . ivy-display-function-fallback)
|
||||
(counsel-find-file . ivy-display-function-fallback)
|
||||
(counsel-recentf . ivy-display-function-fallback)
|
||||
(counsel-register . ivy-posframe-display-at-frame-bottom-window-center)
|
||||
(dmenu . ivy-posframe-display-at-frame-top-center)
|
||||
(nil . ivy-posframe-display))
|
||||
ivy-posframe-height-alist
|
||||
'((swiper . 20)
|
||||
(dmenu . 20)
|
||||
(t . 10)))
|
||||
(ivy-posframe-mode 1) ; 1 enables posframe-mode, 0 disables it.
|
||||
|
||||
(map! :leader
|
||||
(:prefix ("v" . "Ivy")
|
||||
:desc "Ivy push view" "v p" #'ivy-push-view
|
||||
:desc "Ivy switch view" "v s" #'ivy-switch-view))
|
||||
|
||||
(setq display-line-numbers-type t)
|
||||
(map! :leader
|
||||
:desc "Comment or uncomment lines" "TAB TAB" #'comment-line
|
||||
(:prefix ("t" . "toggle")
|
||||
:desc "Toggle line numbers" "l" #'doom/toggle-line-numbers
|
||||
:desc "Toggle line highlight in frame" "h" #'hl-line-mode
|
||||
:desc "Toggle line highlight globally" "H" #'global-hl-line-mode
|
||||
:desc "Toggle truncate lines" "t" #'toggle-truncate-lines))
|
||||
|
||||
(add-hook 'csharp-mode-hook #'lsp-deferred)
|
||||
|
||||
(add-hook 'go-mode-hook #'lsp-deferred)
|
||||
|
||||
(add-hook 'rust-mode-hook #'lsp-deferred)
|
||||
|
||||
(custom-set-faces
|
||||
'(markdown-header-face ((t (:inherit font-lock-function-name-face :weight bold :family "Mononoki Nerd Font"))))
|
||||
'(markdown-header-face-1 ((t (:inherit markdown-header-face :height 1.7))))
|
||||
'(markdown-header-face-2 ((t (:inherit markdown-header-face :height 1.6))))
|
||||
'(markdown-header-face-3 ((t (:inherit markdown-header-face :height 1.5))))
|
||||
'(markdown-header-face-4 ((t (:inherit markdown-header-face :height 1.4))))
|
||||
'(markdown-header-face-5 ((t (:inherit markdown-header-face :height 1.3))))
|
||||
'(markdown-header-face-6 ((t (:inherit markdown-header-face :height 1.2)))))
|
||||
|
||||
(set-face-attribute 'mode-line nil :font "Mononoki Nerd Font-14")
|
||||
(setq doom-modeline-height 30 ;; sets modeline height
|
||||
doom-modeline-bar-width 5 ;; sets right bar width
|
||||
doom-modeline-persp-name t ;; adds perspective name to modeline
|
||||
doom-modeline-persp-icon t) ;; adds folder icon next to persp name
|
||||
|
||||
(xterm-mouse-mode 1)
|
||||
|
||||
(map! :leader
|
||||
:desc "Toggle neotree" "e" #'neotree-toggle)
|
||||
(setq neo-theme 'nerd)
|
||||
(setq neo-smart-open t)
|
||||
(setq projectile-switch-project-action 'neotree-projectile-action)
|
||||
|
||||
(map! :leader
|
||||
(:prefix ("=" . "open file")
|
||||
:desc "Edit agenda file" "a" #'(lambda () (interactive) (find-file "~/org/agenda.org"))
|
||||
:desc "Edit doom config.org" "c" #'(lambda () (interactive) (find-file "~/.config/doom/config.org"))
|
||||
:desc "Edit doom init.el" "i" #'(lambda () (interactive) (find-file "~/.config/doom/init.el"))
|
||||
:desc "Edit doom packages.el" "p" #'(lambda () (interactive) (find-file "~/.config/doom/packages.el"))))
|
||||
|
||||
(map! :leader
|
||||
:desc "Org babel tangle" "m B" #'org-babel-tangle)
|
||||
(after! org
|
||||
(setq org-directory "~/org/"
|
||||
org-agenda-files '("~/org/agenda.org")
|
||||
org-default-notes-file (expand-file-name "notes.org" org-directory)
|
||||
org-ellipsis " ▼ "
|
||||
org-superstar-headline-bullets-list '("◉" "●" "○" "◆" "●" "○" "◆")
|
||||
org-superstar-item-bullet-alist '((?+ . ?➤) (?- . ?✦)) ; changes +/- symbols in item lists
|
||||
org-log-done 'time
|
||||
org-hide-emphasis-markers t
|
||||
;; ex. of org-link-abbrev-alist in action
|
||||
;; [[arch-wiki:Name_of_Page][Description]]
|
||||
org-link-abbrev-alist ; This overwrites the default Doom org-link-abbrev-list
|
||||
'(("google" . "http://www.google.com/search?q=")
|
||||
("arch-wiki" . "https://wiki.archlinux.org/index.php/")
|
||||
("ddg" . "https://duckduckgo.com/?q=")
|
||||
("wiki" . "https://en.wikipedia.org/wiki/"))
|
||||
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
|
||||
"GAME(j)" ; Things to accomplish at the gym
|
||||
"PROJ(p)" ; A project that contains other tasks
|
||||
"VIDEO(v)" ; Video assignments
|
||||
"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)" )))) ; Task has been cancelled
|
||||
(setq org-agenda-custom-commands
|
||||
'(("p" "Priority view"
|
||||
((tags "PRIORITY=\"A\""
|
||||
((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done))
|
||||
(org-agenda-overriding-header "High priority unfinished tasks:")))
|
||||
(tags "PRIORITY=\"B\""
|
||||
((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done))
|
||||
(org-agenda-overriding-header "Medium priority unfinished tasks:")))
|
||||
(tags "PRIORITY=\"C\""
|
||||
((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done))
|
||||
(org-agenda-overriding-header "Low priority unfinished tasks:")))))
|
||||
("i" "INTEC view"
|
||||
((tags "homeworks"
|
||||
((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done))
|
||||
(org-agenda-overriding-header "Pending homeworks:")))
|
||||
(tags "studies"
|
||||
((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done))
|
||||
(org-agenda-overriding-header "Pending studies:")))
|
||||
(tags "exam"
|
||||
((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done))
|
||||
(org-agenda-overriding-header "Pending exams:")))))
|
||||
))
|
||||
|
||||
(setq
|
||||
org-agenda-block-separator 985827
|
||||
org-fancy-priorities-list '("" "" "")
|
||||
org-priority-faces
|
||||
'((?A :foreground "#fb4934" :weight bold)
|
||||
(?B :foreground "#fabd2f" :weight bold)
|
||||
(?C :foreground "#83a598" :weight bold)))
|
||||
|
||||
(setq org-publish-use-timestamps-flag nil)
|
||||
(setq org-export-with-broken-links t)
|
||||
|
||||
(use-package! org-auto-tangle
|
||||
:defer t
|
||||
:hook (org-mode . org-auto-tangle-mode)
|
||||
:config
|
||||
(setq org-auto-tangle-default t))
|
||||
|
||||
(define-globalized-minor-mode global-rainbow-mode rainbow-mode
|
||||
(lambda () (rainbow-mode 1)))
|
||||
(global-rainbow-mode 1 )
|
||||
|
||||
(map! :leader
|
||||
(:prefix ("r" . "registers")
|
||||
:desc "Copy to register" "c" #'copy-to-register
|
||||
:desc "Frameset to register" "f" #'frameset-to-register
|
||||
:desc "Insert contents of register" "i" #'insert-register
|
||||
:desc "Jump to register" "j" #'jump-to-register
|
||||
:desc "List registers" "l" #'list-registers
|
||||
:desc "Number to register" "n" #'number-to-register
|
||||
:desc "Interactively choose a register" "r" #'counsel-register
|
||||
:desc "View a register" "v" #'view-register
|
||||
:desc "Window configuration to register" "w" #'window-configuration-to-register
|
||||
:desc "Increment register" "+" #'increment-register
|
||||
:desc "Point to register" "SPC" #'point-to-register))
|
||||
|
||||
(setq shell-file-name "/bin/fish"
|
||||
vterm-max-scrollback 5000)
|
||||
(map! :leader
|
||||
:desc "Vterm popup toggle" "v t" #'+vterm/toggle)
|
||||
|
||||
(defun prefer-horizontal-split ()
|
||||
(set-variable 'split-height-threshold nil t)
|
||||
(set-variable 'split-width-threshold 40 t)) ; make this as low as needed
|
||||
(add-hook 'markdown-mode-hook 'prefer-horizontal-split)
|
||||
(map! :leader
|
||||
:desc "Clone indirect buffer other window" "b c" #'clone-indirect-buffer-other-window)
|
||||
|
||||
(map! :leader
|
||||
(:prefix ("w" . "window")
|
||||
:desc "Winner redo" "<right>" #'winner-redo
|
||||
:desc "Winner undo" "<left>" #'winner-undo))
|
||||
|
||||
(map! :leader
|
||||
:desc "Zap to char" "z" #'zap-to-char
|
||||
:desc "Zap up to char" "Z" #'zap-up-to-char)
|
||||
|
||||
(set-frame-parameter nil 'alpha-background 95) ; For current frame
|
||||
(add-to-list 'default-frame-alist '(alpha-background . 95)) ; For all new frames henceforth
|
||||
|
||||
; load path correctly
|
||||
(when (daemonp)
|
||||
(exec-path-from-shell-initialize))
|
||||
|
||||
; Launch new clients in the main workspace
|
||||
(after! persp-mode
|
||||
(setq persp-emacsclient-init-frame-behaviour-override
|
||||
`(+workspace-current-name))
|
||||
)
|
|
@ -1,767 +0,0 @@
|
|||
#+TITLE: DRK's Doom Emacs Config
|
||||
#+AUTHOR: Clay Gomera (Drake)
|
||||
#+DESCRIPTION: DRK's personal Doom Emacs config.
|
||||
#+STARTUP: showeverything
|
||||
#+PROPERTY: header-args :tangle config.el
|
||||
|
||||
* TABLE OF CONTENTS :toc:
|
||||
- [[#about-this-config][ABOUT THIS CONFIG]]
|
||||
- [[#beacon][BEACON]]
|
||||
- [[#bookmarks-and-buffers][BOOKMARKS AND BUFFERS]]
|
||||
- [[#bookmarks][Bookmarks]]
|
||||
- [[#buffers][Buffers]]
|
||||
- [[#global-auto-revert][Global Auto Revert]]
|
||||
- [[#keybindings-within-ibuffer-mode][Keybindings within ibuffer mode]]
|
||||
- [[#calendar][CALENDAR]]
|
||||
- [[#clippy][CLIPPY]]
|
||||
- [[#dap-mode][DAP MODE]]
|
||||
- [[#dired][DIRED]]
|
||||
- [[#keybindings-within-dired-with-peep-dired-mode-enabled][Keybindings Within Dired With Peep-Dired-Mode Enabled]]
|
||||
- [[#making-deleted-files-go-to-trash-can][Making deleted files go to trash can]]
|
||||
- [[#doom-theme][DOOM THEME]]
|
||||
- [[#emojis][EMOJIS]]
|
||||
- [[#fonts][FONTS]]
|
||||
- [[#insert-date][INSERT DATE]]
|
||||
- [[#ivy][IVY]]
|
||||
- [[#ivy-posframe][IVY-POSFRAME]]
|
||||
- [[#ivy-keybindings][IVY KEYBINDINGS]]
|
||||
- [[#line-settings][LINE SETTINGS]]
|
||||
- [[#lsp][LSP]]
|
||||
- [[#markdown][MARKDOWN]]
|
||||
- [[#modeline][MODELINE]]
|
||||
- [[#mouse-support][MOUSE SUPPORT]]
|
||||
- [[#neotree][NEOTREE]]
|
||||
- [[#open-specific-files][OPEN SPECIFIC FILES]]
|
||||
- [[#org-mode][ORG MODE]]
|
||||
- [[#org-publish][Org-publish]]
|
||||
- [[#org-auto-tangle][Org-auto-tangle]]
|
||||
- [[#rainbow-mode][RAINBOW MODE]]
|
||||
- [[#registers][REGISTERS]]
|
||||
- [[#shells][SHELLS]]
|
||||
- [[#splits][SPLITS]]
|
||||
- [[#winner-mode][WINNER MODE]]
|
||||
- [[#zap-to-char][ZAP TO CHAR]]
|
||||
- [[#transparent][TRANSPARENT]]
|
||||
|
||||
* ABOUT THIS CONFIG
|
||||
This is my personal Doom Emacs config. Doom Emacs is a distribution of Emacs
|
||||
that uses the "evil" keybindings (Vim keybindings) and includes a number of nice
|
||||
extensions and a bit of configuration out of the box. I am maintaining this
|
||||
config not just for myself, but also for those that want to explore some of what
|
||||
is possible with Emacs. I will add a lot of examples of plugins and settings,
|
||||
some of them I may not even use personally. I do this because many people
|
||||
following me on YouTube look at my configs as "documentation". This config is
|
||||
based on DistroTube's config.
|
||||
|
||||
* BEACON
|
||||
Never lose your cursor. When you scroll, your cursor will shine! This is a
|
||||
global minor-mode. Turn it on everywhere with:
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(beacon-mode 1)
|
||||
#+end_src
|
||||
|
||||
* BOOKMARKS AND BUFFERS
|
||||
Doom Emacs uses 'SPC b' for keybindings related to bookmarks and buffers.
|
||||
|
||||
** Bookmarks
|
||||
Bookmarks are somewhat like registers in that they record positions you can jump
|
||||
to. Unlike registers, they have long names, and they persist automatically from
|
||||
one Emacs session to the next. The prototypical use of bookmarks is to record
|
||||
where you were reading in various files.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(map! :leader
|
||||
(:prefix ("b". "buffer")
|
||||
:desc "List bookmarks" "L" #'list-bookmarks
|
||||
:desc "Save current bookmarks to bookmark file" "w" #'bookmark-save))
|
||||
#+END_SRC
|
||||
|
||||
** Buffers
|
||||
Regarding /buffers/, the text you are editing in Emacs resides in an object called
|
||||
a /buffer/. Each time you visit a file, a buffer is used to hold the file’s text.
|
||||
Each time you invoke Dired, a buffer is used to hold the directory listing.
|
||||
/Ibuffer/ is a program that lists all of your Emacs /buffers/, allowing you to
|
||||
navigate between them and filter them.
|
||||
|
||||
| COMMAND | DESCRIPTION | KEYBINDING |
|
||||
|-----------------+----------------------+------------|
|
||||
| ibuffer | Launch ibuffer | SPC b i |
|
||||
| kill-buffer | Kill current buffer | SPC b k |
|
||||
| next-buffer | Goto next buffer | SPC b n |
|
||||
| previous-buffer | Goto previous buffer | SPC b p |
|
||||
| save-buffer | Save current buffer | SPC b s |
|
||||
|
||||
** Global Auto Revert
|
||||
A buffer can get out of sync with respect to its visited file on disk if that
|
||||
file is changed by another program. To keep it up to date, you can enable Auto
|
||||
Revert mode by typing M-x auto-revert-mode, or you can set it to be turned on
|
||||
globally with 'global-auto-revert-mode'. I have also turned on Global Auto
|
||||
Revert on non-file buffers, which is especially useful for 'dired' buffers.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(global-auto-revert-mode 1)
|
||||
(setq global-auto-revert-non-file-buffers t)
|
||||
#+end_src
|
||||
|
||||
** Keybindings within ibuffer mode
|
||||
|
||||
| COMMAND | DESCRIPTION | KEYBINDING |
|
||||
|-----------------------------------+----------------------------------------+------------|
|
||||
| ibuffer-mark-forward | Mark the buffer | m |
|
||||
| ibuffer-unmark-forward | Unmark the buffer | u |
|
||||
| ibuffer-do-kill-on-deletion-marks | Kill the marked buffers | x |
|
||||
| ibuffer-filter-by-content | Ibuffer filter by content | f c |
|
||||
| ibuffer-filter-by-directory | Ibuffer filter by directory | f d |
|
||||
| ibuffer-filter-by-filename | Ibuffer filter by filename (full path) | f f |
|
||||
| ibuffer-filter-by-mode | Ibuffer filter by mode | f m |
|
||||
| ibuffer-filter-by-name | Ibuffer filter by name | f n |
|
||||
| ibuffer-filter-disable | Disable ibuffer filter | f x |
|
||||
| ibuffer-do-kill-lines | Hide marked buffers | g h |
|
||||
| ibuffer-update | Restore hidden buffers | g H |
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(evil-define-key 'normal ibuffer-mode-map
|
||||
(kbd "f c") 'ibuffer-filter-by-content
|
||||
(kbd "f d") 'ibuffer-filter-by-directory
|
||||
(kbd "f f") 'ibuffer-filter-by-filename
|
||||
(kbd "f m") 'ibuffer-filter-by-mode
|
||||
(kbd "f n") 'ibuffer-filter-by-name
|
||||
(kbd "f x") 'ibuffer-filter-disable
|
||||
(kbd "g h") 'ibuffer-do-kill-lines
|
||||
(kbd "g H") 'ibuffer-update)
|
||||
#+end_src
|
||||
|
||||
* CALENDAR
|
||||
Let's make a 12-month calendar available so we can have a calendar app that,
|
||||
when we click on time/date in xmobar, we get a nice 12-month calendar to view.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
;; https://stackoverflow.com/questions/9547912/emacs-calendar-show-more-than-3-months
|
||||
(defun drk/year-calendar (&optional year)
|
||||
(interactive)
|
||||
(require 'calendar)
|
||||
(let* (
|
||||
(current-year (number-to-string (nth 5 (decode-time (current-time)))))
|
||||
(month 0)
|
||||
(year (if year year (string-to-number (format-time-string "%Y" (current-time))))))
|
||||
(switch-to-buffer (get-buffer-create calendar-buffer))
|
||||
(when (not (eq major-mode 'calendar-mode))
|
||||
(calendar-mode))
|
||||
(setq displayed-month month)
|
||||
(setq displayed-year year)
|
||||
(setq buffer-read-only nil)
|
||||
(erase-buffer)
|
||||
;; horizontal rows
|
||||
(dotimes (j 4)
|
||||
;; vertical columns
|
||||
(dotimes (i 3)
|
||||
(calendar-generate-month
|
||||
(setq month (+ month 1))
|
||||
year
|
||||
;; indentation / spacing between months
|
||||
(+ 5 (* 25 i))))
|
||||
(goto-char (point-max))
|
||||
(insert (make-string (- 10 (count-lines (point-min) (point-max))) ?\n))
|
||||
(widen)
|
||||
(goto-char (point-max))
|
||||
(narrow-to-region (point-max) (point-max)))
|
||||
(widen)
|
||||
(goto-char (point-min))
|
||||
(setq buffer-read-only t)))
|
||||
|
||||
(defun drk/scroll-year-calendar-forward (&optional arg event)
|
||||
"Scroll the yearly calendar by year in a forward direction."
|
||||
(interactive (list (prefix-numeric-value current-prefix-arg)
|
||||
last-nonmenu-event))
|
||||
(unless arg (setq arg 0))
|
||||
(save-selected-window
|
||||
(if (setq event (event-start event)) (select-window (posn-window event)))
|
||||
(unless (zerop arg)
|
||||
(let* (
|
||||
(year (+ displayed-year arg)))
|
||||
(drk/year-calendar year)))
|
||||
(goto-char (point-min))
|
||||
(run-hooks 'calendar-move-hook)))
|
||||
|
||||
(defun drk/scroll-year-calendar-backward (&optional arg event)
|
||||
"Scroll the yearly calendar by year in a backward direction."
|
||||
(interactive (list (prefix-numeric-value current-prefix-arg)
|
||||
last-nonmenu-event))
|
||||
(drk/scroll-year-calendar-forward (- (or arg 1)) event))
|
||||
|
||||
(map! :leader
|
||||
:desc "Scroll year calendar backward" "<left>" #'drk/scroll-year-calendar-backward
|
||||
:desc "Scroll year calendar forward" "<right>" #'drk/scroll-year-calendar-forward)
|
||||
|
||||
(defalias 'year-calendar 'drk/year-calendar)
|
||||
#+end_src
|
||||
|
||||
* CLIPPY
|
||||
Gives us a popup box with "Clippy, the paper clip". You can make him say various
|
||||
things by calling 'clippy-say' function. But the more useful functions of
|
||||
clippy are the two describe functions provided: 'clippy-describe-function' and
|
||||
'clippy-describe-variable'. Hit the appropriate keybinding while the point is
|
||||
over a function/variable to call it. A popup with helpful clippy will appear,
|
||||
telling you about the function/variable (using describe-function and
|
||||
describe-variable respectively).
|
||||
|
||||
| COMMAND | DESCRIPTION | KEYBINDING |
|
||||
|--------------------------+---------------------------------------+------------|
|
||||
| clippy-describe-function | /Clippy describes function under point/ | SPC c h f |
|
||||
| clippy-describe-variable | /Clippy describes variable under point/ | SPC c h v |
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(map! :leader
|
||||
(:prefix ("c h" . "Help info from Clippy")
|
||||
:desc "Clippy describes function under point" "f" #'clippy-describe-function
|
||||
:desc "Clippy describes variable under point" "v" #'clippy-describe-variable))
|
||||
#+end_src
|
||||
|
||||
* DAP MODE
|
||||
dap-mode is a debugger manager for emacs that supports multiple languages.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(require 'dap-netcore)
|
||||
(require 'dap-dlv-go)
|
||||
(map! :leader
|
||||
(:prefix ("d" . "dap-mode")
|
||||
:desc "Toggle breakpoint" "t" #'dap-breakpoint-toggle
|
||||
:desc "Continue execution" "c" #'dap-continue
|
||||
:desc "Step in" "n" #'dap-step-in
|
||||
:desc "Step out" "N" #'dap-step-out
|
||||
:desc "See all breakpoints" "b" #'dap-ui-breakpoints-toggle
|
||||
:desc "Change variable value" "s" #'dap-ui-set-variable-value
|
||||
:desc "Evaluate expression at point" "e" #'dap-eval-thing-at-point
|
||||
:desc "Evaluate expression" "E" #'dap-eval
|
||||
:desc "Run debugger" "r" #'dap-debug
|
||||
:desc "Restart debugger" "R" #'dap-debug-restart
|
||||
:desc "Stop debugger" "d" #'dap-disconnect))
|
||||
(use-package dap-mode
|
||||
:init
|
||||
(dap-auto-configure-mode)
|
||||
|
||||
:custom
|
||||
(dap-netcore-download-url "https://github.com/Samsung/netcoredbg/releases/download/3.1.0-1031/netcoredbg-linux-amd64.tar.gz"))
|
||||
#+end_src
|
||||
|
||||
* DIRED
|
||||
Dired is the file manager within Emacs.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
;; With dired-open plugin, you can launch external programs for certain
|
||||
;; extensions For example, I set all .png files to open in 'vimiv' and all .mp4
|
||||
;; files to open in 'mpv'
|
||||
(setq dired-open-extensions '(("gif" . "vimiv")
|
||||
("jpg" . "vimiv")
|
||||
("png" . "vimiv")
|
||||
("mkv" . "mpv")
|
||||
("mp3" . "mpv")
|
||||
("mp4" . "mpv")))
|
||||
#+end_src
|
||||
|
||||
** Keybindings Within Dired With Peep-Dired-Mode Enabled
|
||||
If peep-dired is enabled, you will get image previews as you go up/down with 'j'
|
||||
and 'k'
|
||||
|
||||
| COMMAND | DESCRIPTION | KEYBINDING |
|
||||
|----------------------+------------------------------------------+------------|
|
||||
| peep-dired | /Toggle previews within dired/ | SPC d p |
|
||||
| peep-dired-next-file | /Move to next file in peep-dired-mode/ | j |
|
||||
| peep-dired-prev-file | /Move to previous file in peep-dired-mode/ | k |
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(evil-define-key 'normal peep-dired-mode-map
|
||||
(kbd "j") 'peep-dired-next-file
|
||||
(kbd "k") 'peep-dired-prev-file)
|
||||
(add-hook 'peep-dired-hook 'evil-normalize-keymaps)
|
||||
#+END_SRC
|
||||
|
||||
** Making deleted files go to trash can
|
||||
#+begin_src emacs-lisp
|
||||
(setq delete-by-moving-to-trash t
|
||||
trash-directory "~/.local/share/Trash/files/")
|
||||
#+end_src
|
||||
|
||||
* DOOM THEME
|
||||
Setting the theme to doom-one. To try out new themes, I set a keybinding for
|
||||
counsel-load-theme with 'SPC h t'.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(setq doom-theme 'doom-gruvbox)
|
||||
(map! :leader
|
||||
:desc "Load new theme" "h t" #'load-theme)
|
||||
#+END_SRC
|
||||
|
||||
* EMOJIS
|
||||
Emojify is an Emacs extension to display emojis. It can display github style
|
||||
emojis like :smile: or plain ascii ones like :).
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package emojify
|
||||
:hook (after-init . global-emojify-mode))
|
||||
#+end_src
|
||||
|
||||
* FONTS
|
||||
Settings related to fonts within Doom Emacs:
|
||||
+ 'doom-font' -- standard monospace font that is used for most things in Emacs.
|
||||
+ 'doom-variable-pitch-font' -- variable font which is useful in some Emacs plugins.
|
||||
+ 'doom-big-font' -- used in doom-big-font-mode; useful for presentations.
|
||||
+ 'font-lock-comment-face' -- for comments.
|
||||
+ 'font-lock-keyword-face' -- for keywords with special significanclike 'setq' in elisp.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(setq doom-font (font-spec :family "Mononoki Nerd Font" :size 18)
|
||||
doom-variable-pitch-font (font-spec :family "Mononoki Nerd Font" :size 18)
|
||||
doom-big-font (font-spec :family "Mononoki Nerd Font" :size 24))
|
||||
(after! doom-themes
|
||||
(setq doom-themes-enable-bold t
|
||||
doom-themes-enable-italic t))
|
||||
(custom-set-faces!
|
||||
'(font-lock-comment-face :slant italic)
|
||||
'(font-lock-keyword-face :slant italic))
|
||||
#+END_SRC
|
||||
|
||||
* INSERT DATE
|
||||
Some custom functions to insert the date. The function 'insert-todays-date' can
|
||||
be used one of three different ways: (1) just the keybinding without the
|
||||
universal argument prefix, (2) with one universal argument prefix, or (3) with
|
||||
two universal argument prefixes. The universal argument prefix is 'SPC-u' in
|
||||
Doom Emacs (C-u in standard GNU Emacs). The function 'insert-any-date' only
|
||||
outputs to one format, which is the same format as 'insert-todays-date' without
|
||||
a prefix.
|
||||
|
||||
| COMMAND | EXAMPLE OUTPUT | KEYBINDING |
|
||||
|------------------------+---------------------------+-----------------------|
|
||||
| drk/insert-todays-date | Friday, November 19, 2021 | SPC i d t |
|
||||
| drk/insert-todays-date | 11-19-2021 | SPC u SPC i d t |
|
||||
| drk/insert-todays-date | 2021-11-19 | SPC u SPC u SPC i d t |
|
||||
| drk/insert-any-date | Friday, November 19, 2021 | SPC i d a |
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(defun drk/insert-todays-date (prefix)
|
||||
(interactive "P")
|
||||
(let ((format (cond
|
||||
((not prefix) "%A, %B %d, %Y")
|
||||
((equal prefix '(4)) "%m-%d-%Y")
|
||||
((equal prefix '(16)) "%Y-%m-%d"))))
|
||||
(insert (format-time-string format))))
|
||||
|
||||
(require 'calendar)
|
||||
(defun drk/insert-any-date (date)
|
||||
"Insert DATE using the current locale."
|
||||
(interactive (list (calendar-read-date)))
|
||||
(insert (calendar-date-string date)))
|
||||
|
||||
(map! :leader
|
||||
(:prefix ("i d" . "Insert date")
|
||||
:desc "Insert any date" "a" #'drk/insert-any-date
|
||||
:desc "Insert todays date" "t" #'drk/insert-todays-date))
|
||||
#+end_src
|
||||
|
||||
* IVY
|
||||
Ivy is a generic completion mechanism for Emacs.
|
||||
|
||||
** IVY-POSFRAME
|
||||
Ivy-posframe is an ivy extension, which lets ivy use posframe to show its
|
||||
candidate menu. Some of the settings below involve:
|
||||
+ ivy-posframe-display-functions-alist -- sets the display position for specific
|
||||
programs
|
||||
+ ivy-posframe-height-alist -- sets the height of the list displayed for
|
||||
specific programs
|
||||
|
||||
Available functions (positions) for 'ivy-posframe-display-functions-alist'
|
||||
+ ivy-posframe-display-at-frame-center
|
||||
+ ivy-posframe-display-at-window-center
|
||||
+ ivy-posframe-display-at-frame-bottom-left
|
||||
+ ivy-posframe-display-at-window-bottom-left
|
||||
+ ivy-posframe-display-at-frame-bottom-window-center
|
||||
+ ivy-posframe-display-at-point
|
||||
+ ivy-posframe-display-at-frame-top-center
|
||||
|
||||
=NOTE:= If the setting for 'ivy-posframe-display' is set to 'nil' (false),
|
||||
anything that is set to 'ivy-display-function-fallback' will just default to
|
||||
their normal position in Doom Emacs (usually a bottom split). However, if this
|
||||
is set to 't' (true), then the fallback position will be centered in the window.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(setq ivy-posframe-display-functions-alist
|
||||
'((swiper . ivy-posframe-display-at-point)
|
||||
(complete-symbol . ivy-posframe-display-at-point)
|
||||
(counsel-M-x . ivy-display-function-fallback)
|
||||
(counsel-esh-history . ivy-posframe-display-at-window-center)
|
||||
(counsel-describe-function . ivy-display-function-fallback)
|
||||
(counsel-describe-variable . ivy-display-function-fallback)
|
||||
(counsel-find-file . ivy-display-function-fallback)
|
||||
(counsel-recentf . ivy-display-function-fallback)
|
||||
(counsel-register . ivy-posframe-display-at-frame-bottom-window-center)
|
||||
(dmenu . ivy-posframe-display-at-frame-top-center)
|
||||
(nil . ivy-posframe-display))
|
||||
ivy-posframe-height-alist
|
||||
'((swiper . 20)
|
||||
(dmenu . 20)
|
||||
(t . 10)))
|
||||
(ivy-posframe-mode 1) ; 1 enables posframe-mode, 0 disables it.
|
||||
#+END_SRC
|
||||
|
||||
** IVY KEYBINDINGS
|
||||
By default, Doom Emacs does not use 'SPC v', so the format I use for these
|
||||
bindings is 'SPC v' plus 'key'.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(map! :leader
|
||||
(:prefix ("v" . "Ivy")
|
||||
:desc "Ivy push view" "v p" #'ivy-push-view
|
||||
:desc "Ivy switch view" "v s" #'ivy-switch-view))
|
||||
#+END_SRC
|
||||
|
||||
* LINE SETTINGS
|
||||
I set comment-line to 'SPC TAB TAB' which is a rather comfortable keybinding for
|
||||
me on my ZSA Moonlander keyboard. The standard Emacs keybinding for
|
||||
comment-line is 'C-x C-;'. The other keybindings are for commands that toggle
|
||||
on/off various line-related settings. Doom Emacs uses 'SPC t' for "toggle"
|
||||
commands, so I choose 'SPC t' plus 'key' for those bindings.
|
||||
|
||||
| COMMAND | DESCRIPTION | KEYBINDING |
|
||||
|--------------------------+-------------------------------------------+-------------|
|
||||
| comment-line | /Comment or uncomment lines/ | SPC TAB TAB |
|
||||
| hl-line-mode | /Toggle line highlighting in current frame/ | SPC t h |
|
||||
| global-hl-line-mode | /Toggle line highlighting globally/ | SPC t H |
|
||||
| doom/toggle-line-numbers | /Toggle line numbers/ | SPC t l |
|
||||
| toggle-truncate-lines | /Toggle truncate lines/ | SPC t t |
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(setq display-line-numbers-type t)
|
||||
(map! :leader
|
||||
:desc "Comment or uncomment lines" "TAB TAB" #'comment-line
|
||||
(:prefix ("t" . "toggle")
|
||||
:desc "Toggle line numbers" "l" #'doom/toggle-line-numbers
|
||||
:desc "Toggle line highlight in frame" "h" #'hl-line-mode
|
||||
:desc "Toggle line highlight globally" "H" #'global-hl-line-mode
|
||||
:desc "Toggle truncate lines" "t" #'toggle-truncate-lines))
|
||||
#+END_SRC
|
||||
|
||||
* LSP
|
||||
Autostart lsp for programming languages
|
||||
|
||||
- C#:
|
||||
#+begin_src emacs-lisp
|
||||
(add-hook 'csharp-mode-hook #'lsp-deferred)
|
||||
#+end_src
|
||||
|
||||
- Go:
|
||||
#+begin_src emacs-lisp
|
||||
(add-hook 'go-mode-hook #'lsp-deferred)
|
||||
#+end_src
|
||||
|
||||
- Rust:
|
||||
#+begin_src emacs-lisp
|
||||
(add-hook 'rust-mode-hook #'lsp-deferred)
|
||||
#+end_src
|
||||
|
||||
* MARKDOWN
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(custom-set-faces
|
||||
'(markdown-header-face ((t (:inherit font-lock-function-name-face :weight bold :family "Mononoki Nerd Font"))))
|
||||
'(markdown-header-face-1 ((t (:inherit markdown-header-face :height 1.7))))
|
||||
'(markdown-header-face-2 ((t (:inherit markdown-header-face :height 1.6))))
|
||||
'(markdown-header-face-3 ((t (:inherit markdown-header-face :height 1.5))))
|
||||
'(markdown-header-face-4 ((t (:inherit markdown-header-face :height 1.4))))
|
||||
'(markdown-header-face-5 ((t (:inherit markdown-header-face :height 1.3))))
|
||||
'(markdown-header-face-6 ((t (:inherit markdown-header-face :height 1.2)))))
|
||||
#+end_src
|
||||
|
||||
* MODELINE
|
||||
The modeline is the bottom status bar that appears in Emacs windows. For more
|
||||
information on what is available to configure in the Doom modeline, check out:
|
||||
https://github.com/seagle0128/doom-modeline
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(set-face-attribute 'mode-line nil :font "Mononoki Nerd Font-14")
|
||||
(setq doom-modeline-height 30 ;; sets modeline height
|
||||
doom-modeline-bar-width 5 ;; sets right bar width
|
||||
doom-modeline-persp-name t ;; adds perspective name to modeline
|
||||
doom-modeline-persp-icon t) ;; adds folder icon next to persp name
|
||||
#+end_src
|
||||
|
||||
* MOUSE SUPPORT
|
||||
Adding mouse support in the terminal version of Emacs.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(xterm-mouse-mode 1)
|
||||
#+end_src
|
||||
|
||||
* NEOTREE
|
||||
1. SPC + e to toggle neotree
|
||||
2. Make neotree prettier
|
||||
3. Every time when the neotree window is opened, let it find current file and jump to node.
|
||||
4. When running ‘projectile-switch-project’ (SPC p p), ‘neotree’ will change root automatically.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(map! :leader
|
||||
:desc "Toggle neotree" "e" #'neotree-toggle)
|
||||
(setq neo-theme 'nerd)
|
||||
(setq neo-smart-open t)
|
||||
(setq projectile-switch-project-action 'neotree-projectile-action)
|
||||
#+end_src
|
||||
|
||||
* OPEN SPECIFIC FILES
|
||||
Keybindings to open files that I work with all the time using the find-file
|
||||
command, which is the interactive file search that opens with 'C-x C-f' in GNU
|
||||
Emacs or 'SPC f f' in Doom Emacs. These keybindings use find-file
|
||||
non-interactively since we specify exactly what file to open. The format I use
|
||||
for these bindings is 'SPC =' plus 'key' since Doom Emacs does not use 'SPC ='.
|
||||
|
||||
| PATH TO FILE | DESCRIPTION | KEYBINDING |
|
||||
|--------------------------------+-----------------------+------------|
|
||||
| ~/org/agenda.org | /Edit agenda file/ | SPC = a |
|
||||
| ~/.config/doom/config.org" | /Edit doom config.org/ | SPC = c |
|
||||
| ~/.config/doom/init.el" | /Edit doom init.el/ | SPC = i |
|
||||
| ~/.config/doom/packages.el" | /Edit doom packages.el/ | SPC = p |
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(map! :leader
|
||||
(:prefix ("=" . "open file")
|
||||
:desc "Edit agenda file" "a" #'(lambda () (interactive) (find-file "~/org/agenda.org"))
|
||||
:desc "Edit doom config.org" "c" #'(lambda () (interactive) (find-file "~/.config/doom/config.org"))
|
||||
:desc "Edit doom init.el" "i" #'(lambda () (interactive) (find-file "~/.config/doom/init.el"))
|
||||
:desc "Edit doom packages.el" "p" #'(lambda () (interactive) (find-file "~/.config/doom/packages.el"))))
|
||||
#+END_SRC
|
||||
|
||||
* ORG MODE
|
||||
I wrapped most of this block in (after! org). Without this, my settings might
|
||||
be evaluated too early, which will result in my settings being overwritten by
|
||||
Doom's defaults. I have also enabled org-journal, org-superstar and org-roam by
|
||||
adding (+journal +pretty +roam2) to the org section of my Doom Emacs init.el.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(map! :leader
|
||||
:desc "Org babel tangle" "m B" #'org-babel-tangle)
|
||||
(after! org
|
||||
(setq org-directory "~/org/"
|
||||
org-agenda-files '("~/org/agenda.org")
|
||||
org-default-notes-file (expand-file-name "notes.org" org-directory)
|
||||
org-ellipsis " ▼ "
|
||||
org-superstar-headline-bullets-list '("◉" "●" "○" "◆" "●" "○" "◆")
|
||||
org-superstar-item-bullet-alist '((?+ . ?➤) (?- . ?✦)) ; changes +/- symbols in item lists
|
||||
org-log-done 'time
|
||||
org-hide-emphasis-markers t
|
||||
;; ex. of org-link-abbrev-alist in action
|
||||
;; [[arch-wiki:Name_of_Page][Description]]
|
||||
org-link-abbrev-alist ; This overwrites the default Doom org-link-abbrev-list
|
||||
'(("google" . "http://www.google.com/search?q=")
|
||||
("arch-wiki" . "https://wiki.archlinux.org/index.php/")
|
||||
("ddg" . "https://duckduckgo.com/?q=")
|
||||
("wiki" . "https://en.wikipedia.org/wiki/"))
|
||||
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
|
||||
"GAME(j)" ; Things to accomplish at the gym
|
||||
"PROJ(p)" ; A project that contains other tasks
|
||||
"VIDEO(v)" ; Video assignments
|
||||
"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)" )))) ; Task has been cancelled
|
||||
(setq org-agenda-custom-commands
|
||||
'(("p" "Priority view"
|
||||
((tags "PRIORITY=\"A\""
|
||||
((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done))
|
||||
(org-agenda-overriding-header "High priority unfinished tasks:")))
|
||||
(tags "PRIORITY=\"B\""
|
||||
((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done))
|
||||
(org-agenda-overriding-header "Medium priority unfinished tasks:")))
|
||||
(tags "PRIORITY=\"C\""
|
||||
((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done))
|
||||
(org-agenda-overriding-header "Low priority unfinished tasks:")))))
|
||||
("i" "INTEC view"
|
||||
((tags "homeworks"
|
||||
((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done))
|
||||
(org-agenda-overriding-header "Pending homeworks:")))
|
||||
(tags "studies"
|
||||
((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done))
|
||||
(org-agenda-overriding-header "Pending studies:")))
|
||||
(tags "exam"
|
||||
((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done))
|
||||
(org-agenda-overriding-header "Pending exams:")))))
|
||||
))
|
||||
|
||||
(setq
|
||||
org-agenda-block-separator 985827
|
||||
org-fancy-priorities-list '("" "" "")
|
||||
org-priority-faces
|
||||
'((?A :foreground "#fb4934" :weight bold)
|
||||
(?B :foreground "#fabd2f" :weight bold)
|
||||
(?C :foreground "#83a598" :weight bold)))
|
||||
#+END_SRC
|
||||
|
||||
** Org-publish
|
||||
#+begin_src emacs-lisp
|
||||
(setq org-publish-use-timestamps-flag nil)
|
||||
(setq org-export-with-broken-links t)
|
||||
#+end_src
|
||||
|
||||
** Org-auto-tangle
|
||||
=org-auto-tangle= allows you to add the option =#+auto_tangle: t= in your Org file
|
||||
so that it automatically tangles when you save the document.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package! org-auto-tangle
|
||||
:defer t
|
||||
:hook (org-mode . org-auto-tangle-mode)
|
||||
:config
|
||||
(setq org-auto-tangle-default t))
|
||||
#+end_src
|
||||
|
||||
* RAINBOW MODE
|
||||
Rainbox mode displays the actual color for any hex value color. It's such a
|
||||
nice feature that I wanted it turned on all the time, regardless of what mode I
|
||||
am in. The following creates a global minor mode for rainbow-mode and enables
|
||||
it.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(define-globalized-minor-mode global-rainbow-mode rainbow-mode
|
||||
(lambda () (rainbow-mode 1)))
|
||||
(global-rainbow-mode 1 )
|
||||
#+end_src
|
||||
|
||||
* REGISTERS
|
||||
Emacs registers are compartments where you can save text, rectangles and
|
||||
positions for later use. Once you save text or a rectangle in a register, you
|
||||
can copy it into the buffer once or many times; once you save a position in a
|
||||
register, you can jump back to that position once or many times. The default
|
||||
GNU Emacs keybindings for these commands (with the exception of
|
||||
counsel-register) involves 'C-x r' followed by one or more other keys. I wanted
|
||||
to make this a little more user friendly, and since I am using Doom Emacs, I
|
||||
choose to replace the 'C-x r' part of the key chords with 'SPC r'.
|
||||
|
||||
| COMMAND | DESCRIPTION | KEYBINDING |
|
||||
|----------------------------------+----------------------------------+------------|
|
||||
| copy-to-register | /Copy to register/ | SPC r c |
|
||||
| frameset-to-register | /Frameset to register/ | SPC r f |
|
||||
| insert-register | /Insert contents of register/ | SPC r i |
|
||||
| jump-to-register | /Jump to register/ | SPC r j |
|
||||
| list-registers | /List registers/ | SPC r l |
|
||||
| number-to-register | /Number to register/ | SPC r n |
|
||||
| counsel-register | /Interactively choose a register/ | SPC r r |
|
||||
| view-register | /View a register/ | SPC r v |
|
||||
| window-configuration-to-register | /Window configuration to register/ | SPC r w |
|
||||
| increment-register | /Increment register/ | SPC r + |
|
||||
| point-to-register | /Point to register/ | SPC r SPC |
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(map! :leader
|
||||
(:prefix ("r" . "registers")
|
||||
:desc "Copy to register" "c" #'copy-to-register
|
||||
:desc "Frameset to register" "f" #'frameset-to-register
|
||||
:desc "Insert contents of register" "i" #'insert-register
|
||||
:desc "Jump to register" "j" #'jump-to-register
|
||||
:desc "List registers" "l" #'list-registers
|
||||
:desc "Number to register" "n" #'number-to-register
|
||||
:desc "Interactively choose a register" "r" #'counsel-register
|
||||
:desc "View a register" "v" #'view-register
|
||||
:desc "Window configuration to register" "w" #'window-configuration-to-register
|
||||
:desc "Increment register" "+" #'increment-register
|
||||
:desc "Point to register" "SPC" #'point-to-register))
|
||||
#+END_SRC
|
||||
|
||||
* SHELLS
|
||||
Settings for the various shells and terminal emulators within Emacs.
|
||||
+ 'shell-file-name' -- sets the shell to be used in M-x shell, M-x term, M-x
|
||||
ansi-term and M-x vterm.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(setq shell-file-name "/bin/fish"
|
||||
vterm-max-scrollback 5000)
|
||||
(map! :leader
|
||||
:desc "Vterm popup toggle" "v t" #'+vterm/toggle)
|
||||
#+END_SRC
|
||||
|
||||
* SPLITS
|
||||
I set splits to default to opening on the right using 'prefer-horizontal-split'.
|
||||
I set a keybinding for 'clone-indirect-buffer-other-window' for when I want to
|
||||
have the same document in two splits. The text of the indirect buffer is always
|
||||
identical to the text of its base buffer; changes made by editing either one are
|
||||
visible immediately in the other. But in all other respects, the indirect
|
||||
buffer and its base buffer are completely separate. For example, I can fold one
|
||||
split but other will be unfolded.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(defun prefer-horizontal-split ()
|
||||
(set-variable 'split-height-threshold nil t)
|
||||
(set-variable 'split-width-threshold 40 t)) ; make this as low as needed
|
||||
(add-hook 'markdown-mode-hook 'prefer-horizontal-split)
|
||||
(map! :leader
|
||||
:desc "Clone indirect buffer other window" "b c" #'clone-indirect-buffer-other-window)
|
||||
#+END_SRC
|
||||
|
||||
* WINNER MODE
|
||||
Winner mode has been included with GNU Emacs since version 20. This is a global
|
||||
minor mode and, when activated, it allows you to “undo” (and “redo”) changes in
|
||||
the window configuration with the key commands 'SCP w <left>' and 'SPC w
|
||||
<right>'.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(map! :leader
|
||||
(:prefix ("w" . "window")
|
||||
:desc "Winner redo" "<right>" #'winner-redo
|
||||
:desc "Winner undo" "<left>" #'winner-undo))
|
||||
#+END_SRC
|
||||
|
||||
* ZAP TO CHAR
|
||||
Emacs provides a 'zap-to-char' command that kills from the current point to a
|
||||
character. It is bound to 'M-z' in standard GNU Emacs but since Doom Emacs uses
|
||||
'SPC' as its leader key and does not have 'SPC z' binded to anything, it just
|
||||
makes since to use it for 'zap-to-char'. Note that 'zap-to-char' can be used
|
||||
with the universal argument 'SPC u' to modify its behavior. Examples of
|
||||
'zap-to-char' usage are listed in the table below:
|
||||
|
||||
| KEYBINDING | WHAT IS DOES |
|
||||
|---------------------------+------------------------------------------------------------|
|
||||
| SPC z e | deletes all chars to the next occurrence of 'e' |
|
||||
| SPC u 2 SPC z e | deletes all chars to the second occurrence of 'e' |
|
||||
| SPC u - SPC z e | deletes all chars to the previous occurrence of 'e' |
|
||||
| SPC u -2 SPC z e | deletes all chars to the fourth previous occurrence of 'e' |
|
||||
| SPC u 1 0 0 SPC u SPC z e | deletes all chars to the 100th occurrence of 'e' |
|
||||
|
||||
=TIP:= The universal argument (SPC u) can only take a single integer by default.
|
||||
If you need to use a multi-digit number (like 100 in the last example in the
|
||||
table above), then you must terminate the universal argument with another 'SPC
|
||||
u' after typing the number.
|
||||
|
||||
'zap-up-to-char' is an alternative command that does not zap the char specified.
|
||||
It is binded to 'SPC Z'. It can also be used in conjunction with the universal
|
||||
argument 'SPC u' in similar fashion to the the 'zap-to-char' examples above.
|
||||
|
||||
=NOTE:= Vim (evil mode) has similar functionality builtin. You can delete to the
|
||||
next occurrence of 'e' by using 'dte' in normal. To delete to the next
|
||||
occurrence of 'e' including the 'e', then you would use 'dfe'. And you can
|
||||
modify 'dt' and 'df' by prefixing them with numbers, so '2dte' would delete to
|
||||
the second occurrence of 'e'.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(map! :leader
|
||||
:desc "Zap to char" "z" #'zap-to-char
|
||||
:desc "Zap up to char" "Z" #'zap-up-to-char)
|
||||
#+END_SRC
|
||||
|
||||
* TRANSPARENT
|
||||
Transparent window
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(set-frame-parameter nil 'alpha-background 95) ; For current frame
|
||||
(add-to-list 'default-frame-alist '(alpha-background . 95)) ; For all new frames henceforth
|
||||
|
||||
; load path correctly
|
||||
(when (daemonp)
|
||||
(exec-path-from-shell-initialize))
|
||||
|
||||
; Launch new clients in the main workspace
|
||||
(after! persp-mode
|
||||
(setq persp-emacsclient-init-frame-behaviour-override
|
||||
`(+workspace-current-name))
|
||||
)
|
||||
#+END_SRC
|
|
@ -1,195 +0,0 @@
|
|||
;;; init.el -*- lexical-binding: t; -*-
|
||||
|
||||
;; This file controls what Doom modules are enabled and what order they load
|
||||
;; in. Remember to run 'doom sync' after modifying it!
|
||||
|
||||
;; NOTE Press 'SPC h d h' (or 'C-h d h' for non-vim users) to access Doom's
|
||||
;; documentation. There you'll find a link to Doom's Module Index where all
|
||||
;; of our modules are listed, including what flags they support.
|
||||
|
||||
;; NOTE Move your cursor over a module's name (or its flags) and press 'K' (or
|
||||
;; 'C-c c k' for non-vim users) to view its documentation. This works on
|
||||
;; flags as well (those symbols that start with a plus).
|
||||
;;
|
||||
;; Alternatively, press 'gd' (or 'C-c c d') on a module to browse its
|
||||
;; directory (for easy access to its source code).
|
||||
|
||||
(doom! :input
|
||||
;;bidi ; (tfel ot) thgir etirw uoy gnipleh
|
||||
;;chinese
|
||||
;;japanese
|
||||
;;layout ; auie,ctsrnm is the superior home row
|
||||
|
||||
:completion
|
||||
company ; the ultimate code completion backend
|
||||
;;(corfu +orderless) ; complete with cap(f), cape and a flying feather!
|
||||
;;helm ; the *other* search engine for love and life
|
||||
;;ido ; the other *other* search engine...
|
||||
;;ivy ; a search engine for love and life
|
||||
vertico ; the search engine of the future
|
||||
|
||||
:ui
|
||||
;;deft ; notational velocity for Emacs
|
||||
doom ; what makes DOOM look the way it does
|
||||
doom-dashboard ; a nifty splash screen for Emacs
|
||||
doom-quit ; DOOM quit-message prompts when you quit Emacs
|
||||
(emoji +unicode) ; 🙂
|
||||
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
|
||||
;;hydra
|
||||
indent-guides ; highlighted indent columns
|
||||
ligatures ; ligatures and symbols to make your code pretty again
|
||||
;;minimap ; show a map of the code on the side
|
||||
modeline ; snazzy, Atom-inspired modeline, plus API
|
||||
;;nav-flash ; blink cursor line after big motions
|
||||
neotree ; a project drawer, like NERDTree for vim
|
||||
ophints ; highlight the region an operation acts on
|
||||
(popup +defaults) ; tame sudden yet inevitable temporary windows
|
||||
;;tabs ; a tab bar for Emacs
|
||||
;;treemacs ; a project drawer, like neotree but cooler
|
||||
unicode ; extended unicode support for various languages
|
||||
(vc-gutter +pretty) ; vcs diff in the fringe
|
||||
vi-tilde-fringe ; fringe tildes to mark beyond EOB
|
||||
;;window-select ; visually switch windows
|
||||
workspaces ; tab emulation, persistence & separate workspaces
|
||||
;;zen ; distraction-free coding or writing
|
||||
|
||||
:editor
|
||||
(evil +everywhere) ; come to the dark side, we have cookies
|
||||
file-templates ; auto-snippets for empty files
|
||||
fold ; (nigh) universal code folding
|
||||
;;(format +onsave) ; automated prettiness
|
||||
;;god ; run Emacs commands without modifier keys
|
||||
;;lispy ; vim for lisp, for people who don't like vim
|
||||
;;multiple-cursors ; editing in many places at once
|
||||
;;objed ; text object editing for the innocent
|
||||
;;parinfer ; turn lisp into python, sort of
|
||||
;;rotate-text ; cycle region at point between text candidates
|
||||
snippets ; my elves. They type so I don't have to
|
||||
word-wrap ; soft wrapping with language-aware indent
|
||||
|
||||
:emacs
|
||||
dired ; making dired pretty [functional]
|
||||
electric ; smarter, keyword-based electric-indent
|
||||
ibuffer ; interactive buffer management
|
||||
undo ; persistent, smarter undo for your inevitable mistakes
|
||||
vc ; version-control and Emacs, sitting in a tree
|
||||
|
||||
:term
|
||||
;;eshell ; the elisp shell that works everywhere
|
||||
;;shell ; simple shell REPL for Emacs
|
||||
;;term ; basic terminal emulator for Emacs
|
||||
vterm ; the best terminal emulation in Emacs
|
||||
|
||||
:checkers
|
||||
syntax ; tasing you for every semicolon you forget
|
||||
;;(spell +flyspell) ; tasing you for misspelling mispelling
|
||||
;;grammar ; tasing grammar mistake every you make
|
||||
|
||||
:tools
|
||||
;;ansible
|
||||
biblio ; Writes a PhD for you (citation needed)
|
||||
;;collab ; buffers with friends
|
||||
debugger ; FIXME stepping through code, to help you add bugs
|
||||
;;direnv
|
||||
docker
|
||||
;;editorconfig ; let someone else argue about tabs vs spaces
|
||||
;;ein ; tame Jupyter notebooks with emacs
|
||||
(eval +overlay) ; run code, run (also, repls)
|
||||
lookup ; navigate your code and its documentation
|
||||
lsp ; M-x vscode
|
||||
magit ; a git porcelain for Emacs
|
||||
;;make ; run make tasks from Emacs
|
||||
;;pass ; password manager for nerds
|
||||
pdf ; pdf enhancements
|
||||
;;prodigy ; FIXME managing external services & code builders
|
||||
;;rgb ; creating color strings
|
||||
;;taskrunner ; taskrunner for all your projects
|
||||
;;terraform ; infrastructure as code
|
||||
;;tmux ; an API for interacting with tmux
|
||||
tree-sitter ; syntax and parsing, sitting in a tree...
|
||||
;;upload ; map local to remote projects via ssh/ftp
|
||||
|
||||
:os
|
||||
(:if (featurep :system 'macos) macos) ; improve compatibility with macOS
|
||||
tty ; improve the terminal Emacs experience
|
||||
|
||||
:lang
|
||||
;;agda ; types of types of types of types...
|
||||
;;beancount ; mind the GAAP
|
||||
(cc +lsp) ; C > C++ == 1
|
||||
;;clojure ; java with a lisp
|
||||
;;common-lisp ; if you've seen one lisp, you've seen them all
|
||||
;;coq ; proofs-as-programs
|
||||
;;crystal ; ruby at the speed of c
|
||||
csharp ; unity, .NET, and mono shenanigans
|
||||
data ; config/data formats
|
||||
(dart +flutter) ; paint ui and not much else
|
||||
;;dhall
|
||||
;;elixir ; erlang done right
|
||||
;;elm ; care for a cup of TEA?
|
||||
emacs-lisp ; drown in parentheses
|
||||
;;erlang ; an elegant language for a more civilized age
|
||||
;;ess ; emacs speaks statistics
|
||||
;;factor
|
||||
;;faust ; dsp, but you get to keep your soul
|
||||
;;fortran ; in FORTRAN, GOD is REAL (unless declared INTEGER)
|
||||
;;fsharp ; ML stands for Microsoft's Language
|
||||
;;fstar ; (dependent) types and (monadic) effects and Z3
|
||||
gdscript ; the language you waited for
|
||||
(go +lsp) ; the hipster dialect
|
||||
;;(graphql +lsp) ; Give queries a REST
|
||||
;;(haskell +lsp) ; a language that's lazier than I am
|
||||
;;hy ; readability of scheme w/ speed of python
|
||||
;;idris ; a language you can depend on
|
||||
json ; At least it ain't XML
|
||||
;;(java +lsp) ; the poster child for carpal tunnel syndrome
|
||||
javascript ; all(hope(abandon(ye(who(enter(here))))))
|
||||
;;julia ; a better, faster MATLAB
|
||||
;;kotlin ; a better, slicker Java(Script)
|
||||
latex ; writing papers in Emacs has never been so fun
|
||||
;;lean ; for folks with too much to prove
|
||||
;;ledger ; be audit you can be
|
||||
lua ; one-based indices? one-based indices
|
||||
markdown ; writing docs for people to ignore
|
||||
;;nim ; python + lisp at the speed of c
|
||||
;;nix ; I hereby declare "nix geht mehr!"
|
||||
;;ocaml ; an objective camel
|
||||
org ; organize your plain life in plain text
|
||||
;;php ; perl's insecure younger brother
|
||||
;;plantuml ; diagrams for confusing people more
|
||||
;;purescript ; javascript, but functional
|
||||
python ; beautiful is better than ugly
|
||||
;;qt ; the 'cutest' gui framework ever
|
||||
;;racket ; a DSL for DSLs
|
||||
;;raku ; the artist formerly known as perl6
|
||||
rest ; Emacs as a REST client
|
||||
;;rst ; ReST in peace
|
||||
;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"}
|
||||
(rust +lsp) ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
|
||||
;;scala ; java, but good
|
||||
;;(scheme +guile) ; a fully conniving family of lisps
|
||||
sh ; she sells {ba,z,fi}sh shells on the C xor
|
||||
;;sml
|
||||
;;solidity ; do you need a blockchain? No.
|
||||
;;swift ; who asked for emoji variables?
|
||||
;;terra ; Earth and Moon in alignment for performance.
|
||||
web ; the tubes
|
||||
yaml ; JSON, but readable
|
||||
zig ; C, but simpler
|
||||
|
||||
:email
|
||||
;;(mu4e +org +gmail)
|
||||
;;notmuch
|
||||
;;(wanderlust +gmail)
|
||||
|
||||
:app
|
||||
calendar
|
||||
;;emms
|
||||
;;everywhere ; *leave* Emacs!? You must be joking
|
||||
;;irc ; how neckbeards socialize
|
||||
(rss +org) ; emacs as an RSS reader
|
||||
;;twitter ; twitter client https://twitter.com/vnought
|
||||
|
||||
:config
|
||||
literate
|
||||
(default +bindings +smartparens))
|
|
@ -1,83 +0,0 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; $DOOMDIR/packages.el
|
||||
|
||||
;; To install a package with Doom you must declare them here and run 'doom sync'
|
||||
;; on the command line, then restart Emacs for the changes to take effect -- or
|
||||
;; use 'M-x doom/reload'.
|
||||
|
||||
|
||||
;; To install SOME-PACKAGE from MELPA, ELPA or emacsmirror:
|
||||
;; (package! some-package)
|
||||
|
||||
;; To install a package directly from a remote git repo, you must specify a
|
||||
;; `:recipe'. You'll find documentation on what `:recipe' accepts here:
|
||||
;; https://github.com/radian-software/straight.el#the-recipe-format
|
||||
;; (package! another-package
|
||||
;; :recipe (:host github :repo "username/repo"))
|
||||
|
||||
;; If the package you are trying to install does not contain a PACKAGENAME.el
|
||||
;; file, or is located in a subdirectory of the repo, you'll need to specify
|
||||
;; `:files' in the `:recipe':
|
||||
;; (package! this-package
|
||||
;; :recipe (:host github :repo "username/repo"
|
||||
;; :files ("some-file.el" "src/lisp/*.el")))
|
||||
|
||||
;; If you'd like to disable a package included with Doom, you can do so here
|
||||
;; with the `:disable' property:
|
||||
;; (package! builtin-package :disable t)
|
||||
|
||||
;; You can override the recipe of a built in package without having to specify
|
||||
;; all the properties for `:recipe'. These will inherit the rest of its recipe
|
||||
;; from Doom or MELPA/ELPA/Emacsmirror:
|
||||
;; (package! builtin-package :recipe (:nonrecursive t))
|
||||
;; (package! builtin-package-2 :recipe (:repo "myfork/package"))
|
||||
|
||||
;; Specify a `:branch' to install a package from a particular branch or tag.
|
||||
;; This is required for some packages whose default branch isn't 'master' (which
|
||||
;; our package manager can't deal with; see radian-software/straight.el#279)
|
||||
;; (package! builtin-package :recipe (:branch "develop"))
|
||||
|
||||
;; Use `:pin' to specify a particular commit to install.
|
||||
;; (package! builtin-package :pin "1a2b3c4d5e")
|
||||
|
||||
|
||||
;; Doom's packages are pinned to a specific commit and updated from release to
|
||||
;; release. The `unpin!' macro allows you to unpin single packages...
|
||||
;; (unpin! pinned-package)
|
||||
;; ...or multiple packages
|
||||
;; (unpin! pinned-package another-pinned-package)
|
||||
;; ...Or *all* packages (NOT RECOMMENDED; will likely break things)
|
||||
;; (unpin! t)
|
||||
|
||||
(package! gitconfig-mode
|
||||
:recipe (:host github :repo "magit/git-modes"
|
||||
:files ("gitconfig-mode.el")))
|
||||
(package! gitignore-mode
|
||||
:recipe (:host github :repo "magit/git-modes"
|
||||
:files ("gitignore-mode.el")))
|
||||
(package! flycheck-aspell)
|
||||
(package! async)
|
||||
(package! dired-open)
|
||||
(package! dired-subtree)
|
||||
(package! esxml)
|
||||
(package! evil-tutor)
|
||||
(package! imenu-list)
|
||||
(package! ivy-posframe)
|
||||
(package! mw-thesaurus)
|
||||
(package! org-board)
|
||||
(package! org-web-tools)
|
||||
(package! org-auto-tangle)
|
||||
(package! peep-dired)
|
||||
(package! rainbow-mode)
|
||||
(package! request)
|
||||
(package! resize-window)
|
||||
(package! s)
|
||||
(package! tldr)
|
||||
(package! wc-mode)
|
||||
(package! beacon)
|
||||
(package! olivetti)
|
||||
(package! sharper)
|
||||
(package! csproj-mode)
|
||||
(package! dap-mode)
|
||||
(package! vimrc-mode)
|
||||
(package! exec-path-from-shell)
|
|
@ -16,7 +16,7 @@ set fish_greeting # Supresses fish's intro messa
|
|||
set TERM "xterm-256color" # Sets the terminal type
|
||||
|
||||
### SET BAT AS MANPAGER
|
||||
#set -x MANPAGER "batman"
|
||||
set -x MANPAGER "sh -c 'sed -u -e \"s/\\x1B\[[0-9;]*m//g; s/.\\x08//g\" | bat -p -lman'"
|
||||
|
||||
### SET EITHER DEFAULT EMACS MODE OR VI MODE ###
|
||||
function fish_user_key_bindings
|
||||
|
@ -130,24 +130,14 @@ alias .5='cd ../../../../..'
|
|||
|
||||
# use lunarvim or neovim for vim if present.
|
||||
if test -x "$HOME/.local/bin/lvim"
|
||||
alias vim="$HOME/.local/bin/lvim"
|
||||
alias vim "$HOME/.local/bin/lvim"
|
||||
else if test -x (command -v nvim)
|
||||
alias vim="nvim"
|
||||
alias vim "nvim"
|
||||
end
|
||||
|
||||
# bat as cat
|
||||
if test -x (command -v bat)
|
||||
alias cat="bat"
|
||||
end
|
||||
|
||||
# fastfetch as neofetch
|
||||
if test -x (command -v fastfetch)
|
||||
alias neofetch="fastfetch"
|
||||
end
|
||||
|
||||
# btop as htop
|
||||
if test -x (command -v btop)
|
||||
alias htop="btop"
|
||||
alias cat "bat"
|
||||
end
|
||||
|
||||
# Changing "ls" to "eza"
|
||||
|
@ -158,12 +148,11 @@ alias lt='eza -aT --color=always --group-directories-first' # tree listing
|
|||
alias l.='eza -a | egrep "^\."'
|
||||
|
||||
# package management
|
||||
alias xbu="sudo xbps-install -Su"
|
||||
alias xbi="sudo xbps-install -S"
|
||||
alias xbr="sudo xbps-remove -R"
|
||||
alias xbrs="sudo xbps-remove"
|
||||
alias xbc="sudo xbps-remove -Oo"
|
||||
alias xbs="sudo xbps-query -R"
|
||||
alias pku="paru -Syu"
|
||||
alias pki="paru -S"
|
||||
alias pkr="paru -Rcns"
|
||||
alias pks="paru -Ss"
|
||||
alias pkc="paru -Scc && paru -Rns (pacman -Qtdq)"
|
||||
|
||||
# Colorize grep output (good for log files)
|
||||
alias grep='grep --color=auto'
|
||||
|
@ -182,9 +171,9 @@ alias mkdir='mkdir -pv'
|
|||
# audio
|
||||
alias mx='pulsemixer'
|
||||
alias amx='alsamixer'
|
||||
alias mk='musikcube'
|
||||
alias ms='musikcube'
|
||||
alias music='musikcube'
|
||||
alias mk='cmus'
|
||||
alias ms='cmus'
|
||||
alias music='cmus'
|
||||
|
||||
# multimedia scripts
|
||||
alias fli='flix-cli'
|
||||
|
@ -244,11 +233,6 @@ alias wfi-on='nmcli radio wifi on'
|
|||
alias wfi-off='nmcli radio wifi off'
|
||||
alias blt='bluetoothctl'
|
||||
|
||||
# android emulator
|
||||
alias avd='QT_QPA_PLATFORM=xcb emulator -avd Pixel_7_Pro_API_35'
|
||||
alias avds='emulator -list-avds'
|
||||
alias avde='QT_QPA_PLATFORM=xcb emulator -avd'
|
||||
|
||||
### SETTING THE STARSHIP PROMPT ###
|
||||
starship init fish | source
|
||||
zoxide init fish | source
|
||||
|
|
83
config/fnott/fnott.ini
Normal file
83
config/fnott/fnott.ini
Normal file
|
@ -0,0 +1,83 @@
|
|||
# -*- conf -*-
|
||||
|
||||
# For documentation on these options, see `man fnott.ini`
|
||||
|
||||
# =======================
|
||||
# General Options
|
||||
# =======================
|
||||
|
||||
# output=<undefined>#
|
||||
# min-width=0
|
||||
# max-width=0
|
||||
# max-height=0
|
||||
stacking-order=bottom-up
|
||||
anchor=top-right
|
||||
icon-theme=Papirus-Dark
|
||||
selection-helper=fuzzel --dmenu0
|
||||
selection-helper-uses-null-separator=true
|
||||
play-sound=paplay ${filename}
|
||||
sound-file=/usr/share/sounds/ocean/stereo/message-contact-in.oga
|
||||
layer=top
|
||||
dpi-aware=yes
|
||||
|
||||
# Timeout values are in seconds. 0 to disable
|
||||
max-timeout=10
|
||||
default-timeout=5
|
||||
# idle-timeout=0
|
||||
|
||||
# =======================
|
||||
# Fonts and Formating
|
||||
# =======================
|
||||
|
||||
# title
|
||||
title-font=Mononoki Nerd Font:size=6
|
||||
title-format= # don't want this printed
|
||||
|
||||
# summary
|
||||
summary-font=Mononoki Nerd Font:size=8
|
||||
summary-format=<i>%s</i>\n
|
||||
|
||||
# body
|
||||
body-font=Mononoki Nerd Font:size=8
|
||||
body-format=%b
|
||||
|
||||
# =======================
|
||||
# Appearance
|
||||
# =======================
|
||||
|
||||
# sizes, paddings, margins
|
||||
max-icon-size=32
|
||||
edge-margin-vertical=5
|
||||
edge-margin-horizontal=5
|
||||
notification-margin=8
|
||||
border-radius=0
|
||||
border-size=3
|
||||
padding-vertical=18
|
||||
padding-horizontal=18
|
||||
progress-bar-height=20
|
||||
#icon= # dont want an icon
|
||||
|
||||
# colors
|
||||
background=1d2021ff
|
||||
border-color=cc241dff
|
||||
title-color=fbf1c7ff
|
||||
summary-color=ebdbb2ff
|
||||
body-color=ebdbb2ff
|
||||
progress-bar-color=fbf1c7ff
|
||||
|
||||
|
||||
# =======================
|
||||
# Priorities (low, normal, critical)
|
||||
# =======================
|
||||
|
||||
# [low]
|
||||
# background=2b2b2bff
|
||||
# title-color=888888ff
|
||||
# summary-color=888888ff
|
||||
# body-color=888888ff
|
||||
|
||||
# [normal]
|
||||
|
||||
[critical]
|
||||
background=1d2021ff
|
||||
border-color=fb4934ff
|
|
@ -25,7 +25,7 @@ font=Mononoki Nerd Font:size=12
|
|||
# initial-window-size-pixels=700x500 # Or,
|
||||
initial-window-size-chars=140x35
|
||||
# initial-window-mode=windowed
|
||||
pad=10x10 # optionally append 'center'
|
||||
pad=8x8 # optionally append 'center'
|
||||
# resize-by-cells=yes
|
||||
# resize-delay-ms=100
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
# rs_clip - A simple clipboard menu script for rofi/dmenu/wofi/fuzzel
|
||||
# Author: Clay Gomera (Drake)
|
||||
# Dependencies: {rofi || dmenu || wofi // fuzzel}, cliphist, wl-clipboard (wl-copy)
|
||||
# Dependencies: fuzzel, cliphist, wl-clipboard (wl-copy)
|
||||
|
||||
########################
|
||||
# Function Definitions #
|
||||
|
@ -10,21 +10,8 @@
|
|||
|
||||
# Check for missing dependencies
|
||||
check_dependencies() {
|
||||
local run_launcher_found=false
|
||||
for launcher in rofi dmenu wofi fuzzel; do
|
||||
if command -v "$launcher" &> /dev/null; then
|
||||
run_launcher_found=true
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "$run_launcher_found" = false ]; then
|
||||
echo "Missing dependency: one of rofi, dmenu, wofi or fuzzel is required."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
local missing_deps=()
|
||||
for dep in cliphist wl-copy; do
|
||||
for dep in fuzzel cliphist wl-copy; do
|
||||
if ! command -v "$dep" &> /dev/null; then
|
||||
missing_deps+=("$dep")
|
||||
fi
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
# rs_emoji - A simple emoji picker menu script for rofi/dmenu/wofi/fuzzel
|
||||
# Author: Clay Gomera (Drake)
|
||||
# Dependencies: {rofi || dmenu || wofi || fuzzel}, wl-clipboard (wl-copy)
|
||||
# Dependencies: fuzzel, wl-clipboard (wl-copy)
|
||||
|
||||
########################
|
||||
# Function Definitions #
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# ***This script was made by Clay Gomera (Drake)***
|
||||
# - Description: A simple power menu script for rofi/dmenu/wofi
|
||||
# - Dependencies: {rofi||dmenu||wofi}, power-profiles-daemon, swaylock
|
||||
#
|
||||
# - Description: A simple power menu script for fuzzel
|
||||
# - Dependencies: fuzzel, power-profiles-daemon, libnotify (notify-send)
|
||||
|
||||
#######################
|
||||
## Main manu options ##
|
||||
#######################
|
||||
#####################
|
||||
# Main manu options #
|
||||
#####################
|
||||
option1=" Logout"
|
||||
option2=" Reboot"
|
||||
option3=" Power off"
|
||||
|
@ -17,23 +16,22 @@ option6=" Change power profile"
|
|||
option7=" Exit"
|
||||
options="$option1\n$option2\n$option3\n$option4\n$option5\n$option6\n$option7"
|
||||
|
||||
####################################
|
||||
## Power profiles submenu options ##
|
||||
####################################
|
||||
##################################
|
||||
# Power profiles submenu options #
|
||||
##################################
|
||||
pwr1=" Performance"
|
||||
pwr2=" Balanced"
|
||||
pwr3=" Power Saver"
|
||||
pwr4=" Cancel"
|
||||
pwrs="$pwr1\n$pwr2\n$pwr3\n$pwr4"
|
||||
|
||||
#####
|
||||
## This variable will store the current wallpaper
|
||||
#####
|
||||
###################
|
||||
# Other variables #
|
||||
###################
|
||||
# This variable will store the current wallpaper
|
||||
currwall="$HOME/.config/sway/wallpaper/locked.*"
|
||||
|
||||
#####
|
||||
## This variable will store the current power profile
|
||||
#####
|
||||
# This variable will store the current power profile
|
||||
currentpwr=$(powerprofilesctl get)
|
||||
if [ "$currentpwr" = "performance" ]; then
|
||||
currentpwr="$pwr1"
|
||||
|
@ -47,54 +45,94 @@ fi
|
|||
prompt1="[ Power Options] "
|
||||
prompt2="[ Power Profiles - Currently set to: $currentpwr] "
|
||||
|
||||
##########
|
||||
## main ##
|
||||
##########
|
||||
action=$(echo -e "$options" | $RUNNER -l 7 -p "$prompt1") # main menu prompt
|
||||
########################
|
||||
# Function Definitions #
|
||||
########################
|
||||
# Check for missing dependencies
|
||||
check_dependencies() {
|
||||
local missing_deps=()
|
||||
for dep in fuzzel powerprofilesctl notify-send; do
|
||||
if ! command -v "$dep" &> /dev/null; then
|
||||
missing_deps+=("$dep")
|
||||
fi
|
||||
done
|
||||
|
||||
if [ ${#missing_deps[@]} -ne 0 ]; then
|
||||
echo "Missing dependencies: ${missing_deps[*]}"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
## Ask yes/no for action confirmation
|
||||
confirm_action() {
|
||||
local prompt="$1"
|
||||
echo -e " Yes\n No" | $RUNNER -i -l 2 -p "$prompt" | grep -q " Yes"
|
||||
}
|
||||
|
||||
####################
|
||||
# Main Script Flow #
|
||||
####################
|
||||
|
||||
check_dependencies
|
||||
|
||||
action=$(echo -e "$options" | $RUNNER -i -l 7 -p "$prompt1") # main menu prompt
|
||||
if [ -z "$action" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
case "$action" in
|
||||
"$option1")
|
||||
loginctl kill-session self
|
||||
if confirm_action "[ Are you sure you want to logout?] "; then
|
||||
paplay /usr/share/sounds/ocean/stereo/desktop-logout.oga &
|
||||
sleep 1
|
||||
loginctl kill-session self
|
||||
fi
|
||||
;;
|
||||
"$option2")
|
||||
loginctl reboot
|
||||
if confirm_action "[ Are you sure you want to reboot?] "; then
|
||||
paplay /usr/share/sounds/ocean/stereo/desktop-logout.oga &
|
||||
sleep 1
|
||||
systemctl reboot
|
||||
fi
|
||||
;;
|
||||
"$option3")
|
||||
loginctl poweroff
|
||||
if confirm_action "[ Are you sure you want to power off?] "; then
|
||||
paplay /usr/share/sounds/ocean/stereo/desktop-logout.oga &
|
||||
sleep 1
|
||||
systemctl poweroff
|
||||
fi
|
||||
;;
|
||||
"$option4")
|
||||
loginctl suspend
|
||||
systemctl suspend
|
||||
;;
|
||||
"$option5")
|
||||
swaylock -i "$currwall"
|
||||
loginctl lock-session
|
||||
;;
|
||||
"$option6")
|
||||
#####
|
||||
## These conditions will be used for the prompt
|
||||
#####
|
||||
pwraction=$(echo -e "$pwrs" | $RUNNER -l 4 -p "$prompt2")
|
||||
pwraction=$(echo -e "$pwrs" | $RUNNER -l 4 -i -p "$prompt2")
|
||||
case "$pwraction" in
|
||||
"$pwr1")
|
||||
if [ "$currentpwr" = "$pwr1" ]; then
|
||||
notify-send "The power profile is already set to performance"
|
||||
notify-send "Power Menu" "The power profile is already set to performance"
|
||||
exit 1
|
||||
else
|
||||
powerprofilesctl set performance && notify-send "Power profile switched to performance"
|
||||
powerprofilesctl set performance && notify-send "Power Menu" "Power profile switched to performance"
|
||||
fi
|
||||
;;
|
||||
"$pwr2")
|
||||
if [ "$currentpwr" = "$pwr2" ]; then
|
||||
notify-send "The power profile is already set to balanced"
|
||||
notify-send "Power Menu" "The power profile is already set to balanced"
|
||||
exit 1
|
||||
else
|
||||
powerprofilesctl set balanced && notify-send "Power profile switched to balanced"
|
||||
powerprofilesctl set balanced && notify-send "Power Menu" "Power profile switched to balanced"
|
||||
fi
|
||||
;;
|
||||
"$pwr3")
|
||||
if [ "$currentpwr" = "$pwr3" ]; then
|
||||
notify-send "The power profile is already set to power saver"
|
||||
notify-send "Power Menu" "The power profile is already set to power saver"
|
||||
exit 1
|
||||
else
|
||||
powerprofilesctl set power-saver && notify-send "Power profile switched to power saver"
|
||||
powerprofilesctl set power-saver && notify-send "Power Menu" "Power profile switched to power saver"
|
||||
fi
|
||||
;;
|
||||
"$pwr4")
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
# rs_scrot - A simple screenshot menu script for rofi/dmenu/wofi/fuzzel
|
||||
# Author: Clay Gomera (Drake)
|
||||
# Dependencies: {rofi || dmenu || wofi || fuzzel}, grim, slurp, jq, wf-recorder, wl-clipboard (wl-copy), libnotify (notify-send)
|
||||
# Dependencies: fuzzel, grim, slurp, jq, wf-recorder, wl-clipboard (wl-copy), libnotify (notify-send)
|
||||
|
||||
############################
|
||||
# Configuration Parameters #
|
||||
|
@ -73,22 +73,9 @@ delayChoices="$delayChoice1\n$delayChoice2\n$delayChoice3\n$delayChoice4"
|
|||
########################
|
||||
|
||||
# Check for missing dependencies
|
||||
CheckDependencies() {
|
||||
local run_launcher_found=false
|
||||
for launcher in rofi dmenu wofi fuzzel; do
|
||||
if command -v "$launcher" &> /dev/null; then
|
||||
run_launcher_found=true
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "$run_launcher_found" = false ]; then
|
||||
echo "Missing dependency: one of rofi, dmenu, wofi or fuzzel is required."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
check_dependencies() {
|
||||
local missing_deps=()
|
||||
for dep in grim slurp jq wl-copy notify-send wf-recorder; do
|
||||
for dep in fuzzel grim slurp jq wl-copy notify-send wf-recorder; do
|
||||
if ! command -v "$dep" &> /dev/null; then
|
||||
missing_deps+=("$dep")
|
||||
fi
|
||||
|
@ -101,24 +88,24 @@ CheckDependencies() {
|
|||
}
|
||||
|
||||
# Prompt user for screenshot action
|
||||
ShotActionPrompt() {
|
||||
shot_action_prompt() {
|
||||
shotActionCases=$(echo -e "$subShotChoices" | $RUNNER -l 3 -i -p "[ What do you want to do with this screenshot?] ")
|
||||
}
|
||||
|
||||
# Prompt user for screenshot delay
|
||||
DelayPrompt() {
|
||||
delay_prompt() {
|
||||
delayActionsCases=$(echo -e "$delayChoices" | $RUNNER -l 4 -i -p "[ Select Delay] ")
|
||||
}
|
||||
|
||||
# Take a full screen screenshot without delay
|
||||
ShotScreen() {
|
||||
ShotActionPrompt
|
||||
shot_screen() {
|
||||
shot_action_prompt
|
||||
case "$shotActionCases" in
|
||||
"$subShotChoice1")
|
||||
sleep 0.5 && grim - | wl-copy && notify-send "Screenshot copied to clipboard"
|
||||
sleep 0.5 && grim - | wl-copy && notify-send "Screenshot Menu" "Screenshot copied to clipboard"
|
||||
;;
|
||||
"$subShotChoice2")
|
||||
sleep 0.5 && grim "$SHOTDIR/$(date +%s).png" && notify-send "Screenshot saved to $SHOTDIR"
|
||||
sleep 0.5 && grim "$SHOTDIR/$(date +%s).png" && notify-send "Screenshot Menu" "Screenshot saved to $SHOTDIR"
|
||||
;;
|
||||
*)
|
||||
exit 0
|
||||
|
@ -127,35 +114,35 @@ ShotScreen() {
|
|||
}
|
||||
|
||||
# Take a full screen screenshot with delay
|
||||
ShotScreenDelay() {
|
||||
ShotActionPrompt
|
||||
shot_screen_delay() {
|
||||
shot_action_prompt
|
||||
if [ "$shotActionCases" = "$subShotChoice1" ]; then
|
||||
DelayPrompt
|
||||
delay_prompt
|
||||
case $delayActionsCases in
|
||||
"$delayChoice1")
|
||||
sleep 3 && grim - | wl-copy && notify-send "Screenshot saved to clipboard"
|
||||
sleep 3 && grim - | wl-copy && notify-send "Screenshot Menu" "Screenshot saved to clipboard"
|
||||
;;
|
||||
"$delayChoice2")
|
||||
sleep 5 && grim - | wl-copy && notify-send "Screenshot saved to clipboard"
|
||||
sleep 5 && grim - | wl-copy && notify-send "Screenshot Menu" "Screenshot saved to clipboard"
|
||||
;;
|
||||
"$delayChoice3")
|
||||
sleep 10 && grim - | wl-copy && notify-send "Screenshot saved to clipboard"
|
||||
sleep 10 && grim - | wl-copy && notify-send "Screenshot Menu" "Screenshot saved to clipboard"
|
||||
;;
|
||||
"$delayChoice4")
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
elif [ "$shotActionCases" = "$subShotChoice2" ]; then
|
||||
DelayPrompt
|
||||
delay_prompt
|
||||
case $delayActionsCases in
|
||||
"$delayChoice1")
|
||||
sleep 3 && grim "$SHOTDIR/$(date +%s).png" && notify-send "Screenshot saved to $SHOTDIR"
|
||||
sleep 3 && grim "$SHOTDIR/$(date +%s).png" && notify-send "Screenshot Menu" "Screenshot saved to $SHOTDIR"
|
||||
;;
|
||||
"$delayChoice2")
|
||||
sleep 5 && grim "$SHOTDIR/$(date +%s).png" && notify-send "Screenshot saved to $SHOTDIR"
|
||||
sleep 5 && grim "$SHOTDIR/$(date +%s).png" && notify-send "Screenshot Menu" "Screenshot saved to $SHOTDIR"
|
||||
;;
|
||||
"$delayChoice3")
|
||||
sleep 10 && grim "$SHOTDIR/$(date +%s).png" && notify-send "Screenshot saved to $SHOTDIR"
|
||||
sleep 10 && grim "$SHOTDIR/$(date +%s).png" && notify-send "Screenshot Menu" "Screenshot saved to $SHOTDIR"
|
||||
;;
|
||||
"$delayChoice4")
|
||||
exit 0
|
||||
|
@ -167,14 +154,14 @@ ShotScreenDelay() {
|
|||
}
|
||||
|
||||
# Take a screenshot of a selected area
|
||||
ShotArea() {
|
||||
ShotActionPrompt
|
||||
shot_area() {
|
||||
shot_action_prompt
|
||||
case "$shotActionCases" in
|
||||
"$subShotChoice1")
|
||||
sleep 0.5 && grim -g "$(slurp)" - | wl-copy && notify-send "Screenshot saved to clipboard"
|
||||
sleep 0.5 && grim -g "$(slurp)" - | wl-copy && notify-send "Screenshot Menu" "Screenshot saved to clipboard"
|
||||
;;
|
||||
"$subShotChoice2")
|
||||
sleep 0.5 && grim -g "$(slurp)" "$SHOTDIR/$(date +%s).png" && notify-send "Screenshot saved to $SHOTDIR"
|
||||
sleep 0.5 && grim -g "$(slurp)" "$SHOTDIR/$(date +%s).png" && notify-send "Screenshot Menu" "Screenshot saved to $SHOTDIR"
|
||||
;;
|
||||
*)
|
||||
exit 0
|
||||
|
@ -183,16 +170,18 @@ ShotArea() {
|
|||
}
|
||||
|
||||
# Take a screenshot of the active window
|
||||
ShotWindow() {
|
||||
ShotActionPrompt
|
||||
local focused=$(hyprctl activewindow -j)
|
||||
local geom=$(echo "$focused" | jq -r '"\(.at[0]),\(.at[1]) \(.size[0])x\(.size[1])"')
|
||||
shot_window() {
|
||||
shot_action_prompt
|
||||
# Get the currently focused window information in Sway
|
||||
local focused=$(swaymsg -t get_tree | jq '.. | select(.focused?) | select(.focused==true)')
|
||||
local geom=$(echo "$focused" | jq -r '"\(.rect.x),\(.rect.y) \(.rect.width)x\(.rect.height)"')
|
||||
|
||||
case "$shotActionCases" in
|
||||
"$subShotChoice1")
|
||||
sleep 0.5 && grim -g "$geom" - | wl-copy && notify-send "Screenshot saved to clipboard"
|
||||
sleep 0.5 && grim -g "$geom" - | wl-copy && notify-send "Screenshot Menu" "Screenshot saved to clipboard"
|
||||
;;
|
||||
"$subShotChoice2")
|
||||
sleep 0.5 && grim -g "$geom" "$SHOTDIR/$(date +%s).png" && notify-send "Screenshot saved to $SHOTDIR"
|
||||
sleep 0.5 && grim -g "$geom" "$SHOTDIR/$(date +%s).png" && notify-send "Screenshot Menu" "Screenshot saved to $SHOTDIR"
|
||||
;;
|
||||
*)
|
||||
exit 0
|
||||
|
@ -201,43 +190,43 @@ ShotWindow() {
|
|||
}
|
||||
|
||||
# Record the entire screen
|
||||
VidScreen() {
|
||||
vid_screen() {
|
||||
for ((i = 3; i >= 1; i--)); do
|
||||
notify-send -t 1000 "Starting in $i seconds"
|
||||
notify-send "Screenshot Menu" -t 1000 "Starting in $i seconds"
|
||||
sleep 1
|
||||
done
|
||||
wf-recorder -f "$VCAPDIR/$(date +%s).mp4"
|
||||
notify-send "Screenshot" "Recording saved to $VCAPDIR"
|
||||
notify-send "Screenshot Menu" "Screenshot" "Recording saved to $VCAPDIR"
|
||||
}
|
||||
|
||||
# Record a specific area of the screen
|
||||
VidArea() {
|
||||
vid_area() {
|
||||
wf-recorder -g "$(slurp)" -f "$VCAPDIR/$(date +%s).mp4"
|
||||
notify-send "Screenshot" "Recording saved to $VCAPDIR"
|
||||
notify-send "Screenshot Menu" "Screenshot" "Recording saved to $VCAPDIR"
|
||||
}
|
||||
|
||||
# Record the entire screen with audio
|
||||
VidScreenAudio() {
|
||||
vid_screen_audio() {
|
||||
local chosenPrettyDevice=$(echo -e "$audioDescriptions" | $RUNNER -i -p "[ Select audio input] ")
|
||||
local chosenDevice="${audioMap["$chosenPrettyDevice"]}"
|
||||
if [ -n "$chosenDevice" ]; then
|
||||
for ((i = 3; i >= 1; i--)); do
|
||||
notify-send -t 1000 "Starting in $i seconds"
|
||||
notify-send "Screenshot Menu" -t 1000 "Starting in $i seconds"
|
||||
sleep 1
|
||||
done
|
||||
wf-recorder --audio="$chosenDevice" -f "$VCAPDIR/$(date +%s).mp4"
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
notify-send "Screenshot" "Recording saved to $VCAPDIR"
|
||||
notify-send "Screenshot Menu" "Screenshot" "Recording saved to $VCAPDIR"
|
||||
}
|
||||
|
||||
# Stop the video recording
|
||||
VidStopRecording() {
|
||||
if pidof wfrecorder; then
|
||||
vid_stop_recording() {
|
||||
if pidof wf-recorder; then
|
||||
killall -s SIGINT wf-recorder
|
||||
else
|
||||
notify-send "You are not recording right now"
|
||||
notify-send "Screenshot Menu" "You are not recording right now"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
@ -258,7 +247,7 @@ fi
|
|||
|
||||
# stop recording with -s or --stop arguments
|
||||
if [ "$1" = '--stop' ] || [ "$1" = '-s' ]; then
|
||||
VidStopRecording
|
||||
vid_stop_recording
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
@ -267,7 +256,7 @@ fi
|
|||
####################
|
||||
|
||||
# Check for dependencies
|
||||
CheckDependencies
|
||||
check_dependencies
|
||||
|
||||
# Display main menu and execute selected option
|
||||
mainCase=$(echo -e "$mainChoices" | $RUNNER -l 3 -i -p "[ Screenshot/Screencast Utility] ")
|
||||
|
@ -280,16 +269,16 @@ case $mainCase in
|
|||
shotCases=$(echo -e "$shotChoices" | $RUNNER -l 5 -i -p "[ Screenshot Menu] ") # screenshot menu prompt
|
||||
case $shotCases in
|
||||
"$shotChoice1")
|
||||
ShotScreen
|
||||
shot_screen
|
||||
;;
|
||||
"$shotChoice2")
|
||||
ShotScreenDelay
|
||||
shot_screen_delay
|
||||
;;
|
||||
"$shotChoice3")
|
||||
ShotArea
|
||||
shot_area
|
||||
;;
|
||||
"$shotChoice4")
|
||||
ShotWindow
|
||||
shot_window
|
||||
;;
|
||||
"$shotChoice5")
|
||||
exit 0
|
||||
|
@ -300,16 +289,16 @@ case $mainCase in
|
|||
vidCases=$(echo -e "$vidChoices" | $RUNNER -l 5 -i -p "[ Screencast Menu] ")
|
||||
case $vidCases in
|
||||
"$vidChoice1")
|
||||
VidScreen
|
||||
vid_screen
|
||||
;;
|
||||
"$vidChoice2")
|
||||
VidArea
|
||||
vid_area
|
||||
;;
|
||||
"$vidChoice3")
|
||||
VidScreenAudio
|
||||
vid_screen_audio
|
||||
;;
|
||||
"$vidChoice4")
|
||||
VidStopRecording
|
||||
vid_stop_recording
|
||||
;;
|
||||
"$vidChoice5")
|
||||
exit 0
|
||||
|
|
|
@ -2,52 +2,17 @@
|
|||
|
||||
# rs_wall - A simple screenshot menu script for rofi/dmenu/wofi/fuzzel
|
||||
# Author: Clay Gomera (Drake)
|
||||
# Dependencies: {rofi || dmenu || wofi || fuzzel}, swaybg
|
||||
# Dependencies: fuzzel, wob
|
||||
|
||||
############################
|
||||
# Configuration Parameters #
|
||||
############################
|
||||
walldir="$XDG_PICTURES_DIR/Wallpapers" # wallpapers folder, change it to yours
|
||||
|
||||
########################
|
||||
# Function Definitions #
|
||||
########################
|
||||
|
||||
# Check for missing dependencies
|
||||
CheckDependencies() {
|
||||
local run_launcher_found=false
|
||||
for launcher in rofi dmenu wofi fuzzel; do
|
||||
if command -v "$launcher" &> /dev/null; then
|
||||
run_launcher_found=true
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "$run_launcher_found" = false ]; then
|
||||
echo "Missing dependency: one of rofi, dmenu, wofi or fuzzel is required."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
local missing_deps=()
|
||||
for dep in swaybg; do
|
||||
if ! command -v "$dep" &> /dev/null; then
|
||||
missing_deps+=("$dep")
|
||||
fi
|
||||
done
|
||||
|
||||
if [ ${#missing_deps[@]} -ne 0 ]; then
|
||||
echo "Missing dependencies: ${missing_deps[*]}"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
####################
|
||||
# Main Script Flow #
|
||||
####################
|
||||
|
||||
# Check for dependencies
|
||||
CheckDependencies
|
||||
|
||||
cd "$walldir" || exit 1
|
||||
wallpaper=$(/bin/ls | sort -n | $RUNNER -l 5 -i -p "[ Wallpaper Selector] ")
|
||||
if [ -n "$wallpaper" ]; then
|
||||
|
|
|
@ -57,9 +57,9 @@ check_dependencies() {
|
|||
turnoff() {
|
||||
nmcli radio wifi off
|
||||
if [ $? -eq 0 ]; then
|
||||
notify-send "WiFi has been turned off"
|
||||
notify-send "Wifi Menu" "WiFi has been turned off"
|
||||
else
|
||||
notify-send "Failed to turn off WiFi"
|
||||
notify-send "Wifi Menu" "Failed to turn off WiFi"
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -67,31 +67,31 @@ turnoff() {
|
|||
turnon() {
|
||||
nmcli radio wifi on
|
||||
if [ $? -eq 0 ]; then
|
||||
notify-send "WiFi has been turned on"
|
||||
notify-send "Wifi Menu" "WiFi has been turned on"
|
||||
else
|
||||
notify-send "Failed to turn on WiFi"
|
||||
notify-send "Wifi Menu" "Failed to turn on WiFi"
|
||||
fi
|
||||
}
|
||||
|
||||
# Disconnect from WiFi
|
||||
disconnect() {
|
||||
if [ "$constate" = "disconnected" ]; then
|
||||
notify-send "WiFi is already disconnected"
|
||||
notify-send "Wifi Menu" "WiFi is already disconnected"
|
||||
elif [ "$constate" = "connected" ]; then
|
||||
nmcli device disconnect "$wlan"
|
||||
if [ $? -eq 0 ]; then
|
||||
notify-send "WiFi has been disconnected"
|
||||
notify-send "Wifi Menu" "WiFi has been disconnected"
|
||||
else
|
||||
notify-send "Failed to disconnect WiFi"
|
||||
notify-send "Wifi Menu" "Failed to disconnect WiFi"
|
||||
fi
|
||||
else
|
||||
notify-send "Unknown WiFi state"
|
||||
notify-send "Wifi Menu" "Unknown WiFi state"
|
||||
fi
|
||||
}
|
||||
|
||||
# Connect to a WiFi network
|
||||
connect() {
|
||||
notify-send -t 5000 "Scanning networks..."
|
||||
notify-send "Wifi Menu" -t 5000 "Scanning networks..."
|
||||
nmcli dev wifi rescan
|
||||
wifinet=$(nmcli -f BSSID,SSID,BARS,SECURITY dev wifi list | sed -n '1!p' | $RUNNER -i -l 10 -p "[ Select a Wifi Network] ");
|
||||
if [ -z "$wifinet" ]; then
|
||||
|
@ -123,9 +123,9 @@ action() {
|
|||
nmcli dev wifi connect "$bssid"
|
||||
fi
|
||||
if [ $? -eq 0 ]; then
|
||||
notify-send "Connected to $ssid"
|
||||
notify-send "Wifi Menu" "Connected to $ssid"
|
||||
else
|
||||
notify-send "Failed to connect to $ssid"
|
||||
notify-send "Wifi Menu" "Failed to connect to $ssid"
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
@ -1,49 +0,0 @@
|
|||
# Global configuration options
|
||||
max-history=5
|
||||
sort=+time
|
||||
|
||||
# Binding options
|
||||
on-button-left=dismiss
|
||||
on-button-right=dismiss-all
|
||||
|
||||
# Style options
|
||||
font=Mononoki Nerd Font 12
|
||||
width=450
|
||||
height=130
|
||||
margin=10
|
||||
padding=15
|
||||
border-size=3
|
||||
icons=1
|
||||
max-icon-size=32
|
||||
icon-location=left
|
||||
markup=1
|
||||
actions=1
|
||||
history=1
|
||||
text-alignment=left
|
||||
default-timeout=15000
|
||||
layer=top
|
||||
anchor=top-right
|
||||
|
||||
# Colors
|
||||
background-color=#282828
|
||||
border-color=#cc241d
|
||||
text-color=#fbf1c7
|
||||
|
||||
[urgency=high]
|
||||
border-color=#fb4934
|
||||
|
||||
[category=CHANGE_LAYOUT]
|
||||
font=Mononoki Nerd Font 26
|
||||
background-color=#282828
|
||||
border-color=#cc241d
|
||||
text-color=#fbf1c7
|
||||
width=300
|
||||
height=100
|
||||
margin=300
|
||||
padding=15
|
||||
border-size=3
|
||||
history=0
|
||||
text-alignment=center
|
||||
layer=top
|
||||
default-timeout=400
|
||||
anchor=top-center
|
|
@ -1,68 +0,0 @@
|
|||
{
|
||||
"browse_category_filter": "^F",
|
||||
"browse_playlists_delete": "KEY_DC",
|
||||
"browse_playlists_new": "M-n",
|
||||
"browse_playlists_rename": "M-r",
|
||||
"browse_playlists_save": "M-s",
|
||||
"context_menu": "M-enter",
|
||||
"hotkeys_backup": "M-b",
|
||||
"hotkeys_reset_to_default": "M-r",
|
||||
"key_down": "j",
|
||||
"key_end": "KEY_END",
|
||||
"key_home": "KEY_HOME",
|
||||
"key_left": "h",
|
||||
"key_page_down": "KEY_NPAGE",
|
||||
"key_page_up": "KEY_PPAGE",
|
||||
"key_right": "l",
|
||||
"key_up": "k",
|
||||
"lyrics_retry": "r",
|
||||
"metadata_rescan": "^R",
|
||||
"navigate_console": "`",
|
||||
"navigate_hotkeys": "?",
|
||||
"navigate_jump_to_playing": "x",
|
||||
"navigate_library": "a",
|
||||
"navigate_library_album_artists": "4",
|
||||
"navigate_library_browse": "b",
|
||||
"navigate_library_browse_albums": "2",
|
||||
"navigate_library_browse_artists": "1",
|
||||
"navigate_library_browse_directories": "d",
|
||||
"navigate_library_browse_genres": "3",
|
||||
"navigate_library_choose_category": "6",
|
||||
"navigate_library_filter": "f",
|
||||
"navigate_library_play_queue": "n",
|
||||
"navigate_library_playlists": "5",
|
||||
"navigate_library_tracks": "t",
|
||||
"navigate_lyrics": "^L",
|
||||
"navigate_settings": "s",
|
||||
"play_queue_clear": "X",
|
||||
"play_queue_delete": "KEY_DC",
|
||||
"play_queue_hot_swap": "M-a",
|
||||
"play_queue_move_down": "M-down",
|
||||
"play_queue_move_up": "M-up",
|
||||
"play_queue_playlist_delete": "M-x",
|
||||
"play_queue_playlist_load": "M-l",
|
||||
"play_queue_playlist_rename": "M-r",
|
||||
"play_queue_playlist_save": "M-s",
|
||||
"playback_next": "M-l",
|
||||
"playback_previous": "M-j",
|
||||
"playback_seek_back": "u",
|
||||
"playback_seek_back_proportional": "y",
|
||||
"playback_seek_forward": "o",
|
||||
"playback_seek_forward_proportional": "p",
|
||||
"playback_stop": "^X",
|
||||
"playback_toggle_mute": "m",
|
||||
"playback_toggle_pause": "^P",
|
||||
"playback_toggle_repeat": ".",
|
||||
"playback_toggle_shuffle": ",",
|
||||
"playback_volume_down": "M-k",
|
||||
"playback_volume_up": "M-i",
|
||||
"search_input_toggle_match_type": "M-m",
|
||||
"show_equalizer": "^E",
|
||||
"toggle_visualizer": "v",
|
||||
"track_list_change_sort_order": "M-s",
|
||||
"track_list_next_group": "]",
|
||||
"track_list_play_from_top": "M-P",
|
||||
"track_list_previous_group": "[",
|
||||
"track_list_rate_track": "r",
|
||||
"view_refresh": "KEY_F(5)"
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# Start ssh-agent from runit
|
||||
#
|
||||
# Author: Dave Eddy <dave@daveeddy.com>
|
||||
# Date: August 29, 2018
|
||||
# License: MIT
|
||||
|
||||
file=~/.ssh/ssh-agent-env
|
||||
|
||||
exec > "$file"
|
||||
|
||||
echo "# started $(date)"
|
||||
|
||||
# For some reason, this line doesn't get emitted by ssh-agent when it is run
|
||||
# with -d or -D. Since we are starting the program with exec we already know
|
||||
# the pid ahead of time though so we can create this line manually
|
||||
echo "SSH_AGENT_PID=$$; export SSH_AGENT_PID"
|
||||
|
||||
exec ssh-agent -D
|
|
@ -2,20 +2,19 @@ bar swaybar_command waybar
|
|||
|
||||
exec {
|
||||
hash dbus-update-activation-environment 2>/dev/null && dbus-update-activation-environment DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
|
||||
$HOME/.config/sway/scripts/pipeinit
|
||||
/usr/libexec/xdg-desktop-portal-wlr
|
||||
/usr/libexec/xdg-desktop-portal-gtk
|
||||
$HOME/.config/sway/scripts/idle
|
||||
/usr/lib/xdg-desktop-portal-wlr
|
||||
/usr/lib/xdg-desktop-portal-gtk
|
||||
/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
|
||||
startidle
|
||||
sway-audio-idle-inhibit
|
||||
fnott
|
||||
wl-paste --type text --watch cliphist store
|
||||
wl-paste --type image --watch cliphist store
|
||||
mako -c ~/.config/mako/config
|
||||
/usr/libexec/polkit-gnome-authentication-agent-1
|
||||
gnome-keyring-daemon --start --components=secrets
|
||||
sway-audio-idle-inhibit
|
||||
dex -a -s ~/.config/autostart
|
||||
$HOME/.config/sway/scripts/nextinit
|
||||
mkfifo /tmp/wobpipe
|
||||
tail -f /tmp/wobpipe | wob -c ~/.config/wob/wob.ini
|
||||
nextinit
|
||||
paplay /usr/share/sounds/ocean/stereo/desktop-login.oga
|
||||
}
|
||||
|
||||
exec_always {
|
||||
|
|
|
@ -55,17 +55,17 @@ bindsym $mod+Return exec $term
|
|||
bindsym $mod+q kill
|
||||
|
||||
# XF86 Keys
|
||||
bindsym XF86AudioRaiseVolume exec pamixer -i 5 && pamixer --get-volume > /tmp/wobpipe
|
||||
bindsym XF86AudioLowerVolume exec pamixer -d 5 && pamixer --get-volume > /tmp/wobpipe
|
||||
bindsym XF86AudioMute exec sh -c 'pamixer -t && if [ "$(pamixer --get-mute)" = "true" ]; then echo "$(pamixer --get-volume) muted" > /tmp/wobpipe; else pamixer --get-volume > /tmp/wobpipe; fi'
|
||||
bindsym XF86AudioMicMute exec pamixer --default-source -t
|
||||
bindsym XF86AudioPause exec playerctl play-pause
|
||||
bindsym XF86AudioPlay exec playerctl play-pause
|
||||
bindsym XF86AudioNext exec playerctl next
|
||||
bindsym XF86AudioPrev exec playerctl previous
|
||||
bindsym XF86AudioStop exec playerctl stop
|
||||
bindsym XF86MonBrightnessUp exec sh -c 'brightnessctl s 5%+ && brightnessctl -m | cut -d, -f4 | tr -d % > /tmp/wobpipe'
|
||||
bindsym XF86MonBrightnessDown exec sh -c 'brightnessctl s 5%- && brightnessctl -m | cut -d, -f4 | tr -d % > /tmp/wobpipe'
|
||||
bindsym XF86AudioRaiseVolume exec mediacontrol volume-up 5
|
||||
bindsym XF86AudioLowerVolume exec mediacontrol volume-down 5
|
||||
bindsym XF86AudioMute exec mediacontrol volume-mute
|
||||
bindsym XF86AudioMicMute exec mediacontrol mic-mute
|
||||
bindsym XF86AudioPause exec mediacontrol media-play-pause
|
||||
bindsym XF86AudioPlay exec mediacontrol media-play-pause
|
||||
bindsym XF86AudioNext exec mediacontrol media-play-next
|
||||
bindsym XF86AudioPrev exec mediacontrol media-play-prev
|
||||
bindsym XF86AudioStop exec mediacontrol media-play-stop
|
||||
bindsym XF86MonBrightnessUp exec mediacontrol brightness-up 5
|
||||
bindsym XF86MonBrightnessDown exec mediacontrol brightness-down 5
|
||||
bindsym XF86News exec $rss
|
||||
|
||||
# Drag floating windows by holding down $mod and left mouse button.
|
||||
|
|
119
config/sway/scripts/mediacontrol
Executable file
119
config/sway/scripts/mediacontrol
Executable file
|
@ -0,0 +1,119 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# dependencies: pamixer, brightnessctl, wob, pulseaudio-utils
|
||||
|
||||
# Configuration
|
||||
WOBPIPE="/tmp/wobpipe"
|
||||
SOUND_EFFECT="/usr/share/sounds/ocean/stereo/audio-volume-change.oga"
|
||||
DEFAULT_VOLUME_STEP=5
|
||||
DEFAULT_BRIGHTNESS_STEP=5
|
||||
|
||||
# Function to display help message
|
||||
show_help() {
|
||||
echo "Usage: $0 [command] [options]"
|
||||
echo ""
|
||||
echo "Commands:"
|
||||
echo " volume-up [STEP] Increase volume by STEP (default: $DEFAULT_VOLUME_STEP)"
|
||||
echo " volume-down [STEP] Decrease volume by STEP (default: $DEFAULT_VOLUME_STEP)"
|
||||
echo " volume-mute Toggle mute for speakers"
|
||||
echo " mic-mute Toggle mute for microphone"
|
||||
echo " media-play-pause Play/pause media"
|
||||
echo " media-next Skip to the next track"
|
||||
echo " media-prev Go back to the previous track"
|
||||
echo " media-stop Stop media playback"
|
||||
echo " brightness-up [STEP] Increase brightness by STEP% (default: $DEFAULT_BRIGHTNESS_STEP)"
|
||||
echo " brightness-down [STEP] Decrease brightness by STEP% (default: $DEFAULT_BRIGHTNESS_STEP)"
|
||||
echo ""
|
||||
}
|
||||
|
||||
# Function to get current volume with mute status
|
||||
get_volume_status() {
|
||||
local volume="$(pamixer --get-volume)"
|
||||
if [ "$(pamixer --get-mute)" = "true" ]; then
|
||||
echo "$volume muted"
|
||||
else
|
||||
echo "$volume"
|
||||
fi
|
||||
}
|
||||
|
||||
# Function to update wobpipe with current volume/mute status
|
||||
update_volume_wobpipe() {
|
||||
update_wobpipe "$(get_volume_status)"
|
||||
}
|
||||
|
||||
# Function to update wobpipe with a custom message
|
||||
update_wobpipe() {
|
||||
echo "$1" > "$WOBPIPE"
|
||||
}
|
||||
|
||||
# Function to change volume with custom step
|
||||
change_volume() {
|
||||
local action="$1"
|
||||
local step="${2:-$DEFAULT_VOLUME_STEP}"
|
||||
if [ "$action" = "up" ]; then
|
||||
pamixer -i "$step"
|
||||
elif [ "$action" = "down" ]; then
|
||||
pamixer -d "$step"
|
||||
fi
|
||||
update_volume_wobpipe
|
||||
paplay "$SOUND_EFFECT"
|
||||
}
|
||||
|
||||
# Function to toggle mute
|
||||
toggle_mute() {
|
||||
pamixer -t
|
||||
update_volume_wobpipe
|
||||
}
|
||||
|
||||
# Function to change brightness with custom step
|
||||
change_brightness() {
|
||||
local action="$1"
|
||||
local step="${2:-$DEFAULT_BRIGHTNESS_STEP}"
|
||||
if [ "$action" = "up" ]; then
|
||||
brightnessctl s "$step%+"
|
||||
elif [ "$action" = "down" ]; then
|
||||
brightnessctl s "$step%-"
|
||||
fi
|
||||
update_wobpipe "$(brightnessctl -m | cut -d, -f4 | tr -d '%')"
|
||||
}
|
||||
|
||||
# Parse command-line arguments
|
||||
case "$1" in
|
||||
volume-up)
|
||||
change_volume "up" "$2"
|
||||
;;
|
||||
volume-down)
|
||||
change_volume "down" "$2"
|
||||
;;
|
||||
volume-mute)
|
||||
toggle_mute
|
||||
;;
|
||||
mic-mute)
|
||||
pamixer --default-source -t
|
||||
;;
|
||||
media-play-pause)
|
||||
playerctl play-pause
|
||||
;;
|
||||
media-next)
|
||||
playerctl next
|
||||
;;
|
||||
media-prev)
|
||||
playerctl previous
|
||||
;;
|
||||
media-stop)
|
||||
playerctl stop
|
||||
;;
|
||||
brightness-up)
|
||||
change_brightness "up" "$2"
|
||||
;;
|
||||
brightness-down)
|
||||
change_brightness "down" "$2"
|
||||
;;
|
||||
-h|--help)
|
||||
show_help
|
||||
;;
|
||||
*)
|
||||
echo "Invalid command: $1"
|
||||
show_help
|
||||
;;
|
||||
esac
|
|
@ -1,9 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
pkill pipewire
|
||||
pkill pipewire-pulse
|
||||
pkill wireplumber
|
||||
|
||||
pipewire &
|
||||
pipewire-pulse &
|
||||
wireplumber &
|
|
@ -31,4 +31,4 @@ export GTK_CURSOR_THEME="Simp1e-Gruvbox-Dark"
|
|||
export RUNNER="fuzzel --dmenu"
|
||||
|
||||
# Start compositor
|
||||
dbus-launch sway
|
||||
exec sway
|
13
etc/crypttab
Normal file
13
etc/crypttab
Normal file
|
@ -0,0 +1,13 @@
|
|||
# Configuration for encrypted block devices.
|
||||
# See crypttab(5) for details.
|
||||
|
||||
# NOTE: Do not list your root (/) partition here, it must be set up
|
||||
# beforehand by the initramfs (/etc/mkinitcpio.conf).
|
||||
|
||||
# <name> <device> <password> <options>
|
||||
# home UUID=b8ad5c18-f445-495d-9095-c9ec4f9d2f37 /etc/mypassword1
|
||||
# data1 /dev/sda3 /etc/mypassword2
|
||||
# data2 /dev/sda5 /etc/cryptfs.key
|
||||
# swap /dev/sdx4 /dev/urandom swap,cipher=aes-cbc-essiv:sha256,size=256
|
||||
# vol /dev/sdb7 none
|
||||
LVMNAME /path/device /path/key luks
|
|
@ -1,22 +1,63 @@
|
|||
#
|
||||
# Configuration file for GRUB.
|
||||
#
|
||||
# GRUB boot loader configuration
|
||||
|
||||
GRUB_DEFAULT=0
|
||||
GRUB_HIDDEN_TIMEOUT=1
|
||||
GRUB_HIDDEN_TIMEOUT_QUIET=true
|
||||
GRUB_TIMEOUT=0
|
||||
GRUB_DISTRIBUTOR="Void"
|
||||
GRUB_CMDLINE_LINUX_DEFAULT="rd.luks.uuid=<UUID> rd.luks.vg=<VGNAME> loglevel=3 quiet"
|
||||
GRUB_TIMEOUT=2
|
||||
GRUB_DISTRIBUTOR="Arch"
|
||||
GRUB_CMDLINE_LINUX_DEFAULT="rd.luks.uuid=UUID rd.luks.name=UUID=LVMNAME rd.luks.key=UUID=KEYPATH loglevel=3 quiet systemd.show_status=auto rd.udev.log_level=3"
|
||||
GRUB_CMDLINE_LINUX=""
|
||||
|
||||
# Preload both GPT and MBR modules so that they are not missed
|
||||
GRUB_PRELOAD_MODULES="part_gpt part_msdos"
|
||||
|
||||
# Uncomment to enable booting from LUKS encrypted devices
|
||||
GRUB_ENABLE_CRYPTODISK=y
|
||||
|
||||
# Set to 'countdown' or 'hidden' to change timeout behavior,
|
||||
# press ESC key to display menu.
|
||||
GRUB_TIMEOUT_STYLE=hidden
|
||||
|
||||
# Uncomment to use basic console
|
||||
#GRUB_TERMINAL_INPUT="console"
|
||||
GRUB_TERMINAL_INPUT=console
|
||||
|
||||
# Uncomment to disable graphical terminal
|
||||
#GRUB_TERMINAL_OUTPUT=console
|
||||
#GRUB_BACKGROUND=/usr/share/void-artwork/splash.png
|
||||
#GRUB_GFXMODE=1920x1080x32
|
||||
|
||||
# The resolution used on graphical terminal
|
||||
# note that you can use only modes which your graphic card supports via VBE
|
||||
# you can see them in real GRUB with the command `videoinfo'
|
||||
GRUB_GFXMODE=auto
|
||||
|
||||
# Uncomment to allow the kernel use the same resolution used by grub
|
||||
GRUB_GFXPAYLOAD_LINUX=keep
|
||||
|
||||
# Uncomment if you want GRUB to pass to the Linux kernel the old parameter
|
||||
# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx"
|
||||
#GRUB_DISABLE_LINUX_UUID=true
|
||||
#GRUB_DISABLE_RECOVERY=true
|
||||
|
||||
# Uncomment to disable generation of recovery mode menu entries
|
||||
GRUB_DISABLE_RECOVERY=true
|
||||
|
||||
# Uncomment and set to the desired menu colors. Used by normal and wallpaper
|
||||
# modes only. Entries specified as foreground/background.
|
||||
#GRUB_COLOR_NORMAL="light-blue/black"
|
||||
#GRUB_COLOR_HIGHLIGHT="light-cyan/blue"
|
||||
|
||||
# Uncomment one of them for the gfx desired, a image background or a gfxtheme
|
||||
#GRUB_BACKGROUND="/path/to/wallpaper"
|
||||
#GRUB_THEME="/path/to/gfxtheme"
|
||||
|
||||
# Uncomment to get a beep at GRUB start
|
||||
#GRUB_INIT_TUNE="480 440 1"
|
||||
|
||||
# Uncomment to make GRUB remember the last selection. This requires
|
||||
# setting 'GRUB_DEFAULT=saved' above.
|
||||
#GRUB_SAVEDEFAULT=true
|
||||
|
||||
# Uncomment to disable submenus in boot menu
|
||||
#GRUB_DISABLE_SUBMENU=y
|
||||
|
||||
# Probing for other operating systems is disabled for security reasons. Read
|
||||
# documentation on GRUB_DISABLE_OS_PROBER, if still want to enable this
|
||||
# functionality install os-prober and uncomment to detect and include other
|
||||
# operating systems.
|
||||
#GRUB_DISABLE_OS_PROBER=false
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
install_items+=" /boot/volume.key /etc/crypttab "
|
24
etc/issue
24
etc/issue
|
@ -1,13 +1,13 @@
|
|||
[H[2J[3J
|
||||
\e[H\e[2J
|
||||
\e[0;32m
|
||||
_______
|
||||
\\_____ `- ____ ____ .__ .___ .____ .__
|
||||
/\\ ___ `- \\ \\ \\ / /___ |__| __| _/ | | |__| ____ __ _____ ___
|
||||
| | / \\ | | \\ Y / _ \\| |/ __ | | | | |/ \\| | \\ \\/ /
|
||||
| | \\___/ | | \\ ( <_> ) / /_/ | | |___| | | \\ | /> <
|
||||
\\ `-_____ \\/ \\___/ \\____/|__\\____ | |_______ \\__|___| /____//__/\\_ \\
|
||||
`-______\\ \\/ \\/ \\/ \\/
|
||||
[0;37;40m
|
||||
[1;34;40m [0;37;40m [1;34;40m [0;37;40m [1;34;40m [0;37;40m [1;37;40m###[0;37;40m [1;34;40m###[0;37;40m [1;37;40m##[0;37;40m
|
||||
[1;34;40m [0;37;40m [1;34;40m [0;37;40m [1;37;40m##[0;37;40m [1;34;40m##[0;37;40m
|
||||
[1;34;40m┌ #### [1;37;40m###[0;37;40m [1;37;40m###[0;37;40m [1;34;40m [0;37;40m [1;37;40m####[0;37;40m [1;34;40m [0;37;40m [1;37;40m##[0;37;40m [1;37;40m###[0;37;40m [1;34;40m##[0;37;40m [1;37;40m### ###[0;37;40m [1;37;40m###[0;37;40m [1;37;40m###[0;37;40m [1;37;40m###[0;37;40m [1;31;40m ###[0;37;40m [1;31;40m###[0;37;40m
|
||||
[1;34;40m│ [0;37;40m [1;34;40m## [0;37;40m [1;37;40m###[0;37;40m [1;37;40m##[1;34;40m [0;37;40m [1;37;40m##[0;37;40m [1;34;40m [0;37;40m [1;37;40m###[0;37;40m [1;31;40m [1;37;40m##[0;37;40m [1;34;40m##[0;37;40m [1;37;40m##[0;37;40m [1;37;40m###[0;37;40m [1;37;40m##[0;37;40m [1;37;40m##[0;37;40m [1;37;40m##[0;37;40m [1;31;40m [0;37;40m [1;31;40m##[0;37;40m [1;31;40m##[0;37;40m
|
||||
[1;34;40m│ ##### [0;37;40m [1;37;40m##[0;37;40m [1;34;40m [0;37;40m [1;37;40m##[0;37;40m [1;34;40m [0;37;40m [1;37;40m##[0;37;40m [1;37;40m##[0;37;40m [1;34;40m##[0;37;40m [1;37;40m##[0;37;40m [1;37;40m##[0;37;40m [1;37;40m##[0;37;40m [1;37;40m##[0;37;40m [1;37;40m##[0;37;40m [1;31;40m [0;37;40m [1;31;40m###[0;37;40m
|
||||
[1;34;40m│ ##[0;37;40m [1;34;40m## [0;37;40m [1;37;40m##[0;37;40m [1;34;40m [0;37;40m [1;37;40m##[0;37;40m [1;34;40m [0;37;40m [1;37;40m##[0;37;40m [1;37;40m##[0;37;40m [1;34;40m##[0;37;40m [1;37;40m##[0;37;40m [1;37;40m##[0;37;40m [1;37;40m##[0;37;40m [1;37;40m##[0;37;40m [1;37;40m ##[0;37;40m [1;31;40m [0;37;40m [1;31;40m##[0;37;40m [1;31;40m## [0;37;40m
|
||||
[1;34;40m│ ###### [0;37;40m [1;37;40m##[0;37;40m [1;34;40m [0;37;40m [1;37;40m####[0;37;40m [1;34;40m [1;37;40m###[0;37;40m [1;37;40m###[0;37;40m [1;34;40m####[0;37;40m [1;37;40m####[0;37;40m [1;37;40m###[0;37;40m [1;37;40m###[0;37;40m [1;37;40m######[0;37;40m [1;31;40m ###[0;37;40m [1;34;40m [1;31;40m ###[0;37;40m
|
||||
[1;34;40m└───────────────────────────────────────────[0;36;40m A simple, lightweight distribution.
|
||||
[0;37;40m
|
||||
OS: Arch\s Kernel: \r Processor: \m TTY: \l
|
||||
[0m
|
||||
|
||||
\e[0m
|
||||
Welcome Back! Linux Version: \r (\n) (\l)
|
||||
|
|
81
etc/mkinitcpio.conf
Normal file
81
etc/mkinitcpio.conf
Normal file
|
@ -0,0 +1,81 @@
|
|||
# vim:set ft=sh
|
||||
# MODULES
|
||||
# The following modules are loaded before any boot hooks are
|
||||
# run. Advanced users may wish to specify all system modules
|
||||
# in this array. For instance:
|
||||
# MODULES=(usbhid xhci_hcd)
|
||||
MODULES=(i915)
|
||||
|
||||
# BINARIES
|
||||
# This setting includes any additional binaries a given user may
|
||||
# wish into the CPIO image. This is run last, so it may be used to
|
||||
# override the actual binaries included by a given hook
|
||||
# BINARIES are dependency parsed, so you may safely ignore libraries
|
||||
BINARIES=()
|
||||
|
||||
# FILES
|
||||
# This setting is similar to BINARIES above, however, files are added
|
||||
# as-is and are not parsed in any way. This is useful for config files.
|
||||
FILES=(KEYPATH)
|
||||
|
||||
# HOOKS
|
||||
# This is the most important setting in this file. The HOOKS control the
|
||||
# modules and scripts added to the image, and what happens at boot time.
|
||||
# Order is important, and it is recommended that you do not change the
|
||||
# order in which HOOKS are added. Run 'mkinitcpio -H <hook name>' for
|
||||
# help on a given hook.
|
||||
# 'base' is _required_ unless you know precisely what you are doing.
|
||||
# 'udev' is _required_ in order to automatically load modules
|
||||
# 'filesystems' is _required_ unless you specify your fs modules in MODULES
|
||||
# Examples:
|
||||
## This setup specifies all modules in the MODULES setting above.
|
||||
## No RAID, lvm2, or encrypted root is needed.
|
||||
# HOOKS=(base)
|
||||
#
|
||||
## This setup will autodetect all modules for your system and should
|
||||
## work as a sane default
|
||||
# HOOKS=(base udev autodetect modconf block filesystems fsck)
|
||||
#
|
||||
## This setup will generate a 'full' image which supports most systems.
|
||||
## No autodetection is done.
|
||||
# HOOKS=(base udev modconf block filesystems fsck)
|
||||
#
|
||||
## This setup assembles a mdadm array with an encrypted root file system.
|
||||
## Note: See 'mkinitcpio -H mdadm_udev' for more information on RAID devices.
|
||||
# HOOKS=(base udev modconf keyboard keymap consolefont block mdadm_udev encrypt filesystems fsck)
|
||||
#
|
||||
## This setup loads an lvm2 volume group.
|
||||
# HOOKS=(base udev modconf block lvm2 filesystems fsck)
|
||||
#
|
||||
## This will create a systemd based initramfs which loads an encrypted root filesystem.
|
||||
# HOOKS=(base systemd autodetect modconf kms keyboard sd-vconsole sd-encrypt block filesystems fsck)
|
||||
#
|
||||
## NOTE: If you have /usr on a separate partition, you MUST include the
|
||||
# usr and fsck hooks.
|
||||
HOOKS=(base systemd autodetect microcode modconf kms keyboard keymap sd-vconsole block sd-encrypt lvm2 filesystems fsck)
|
||||
|
||||
# COMPRESSION
|
||||
# Use this to compress the initramfs image. By default, zstd compression
|
||||
# is used for Linux ≥ 5.9 and gzip compression is used for Linux < 5.9.
|
||||
# Use 'cat' to create an uncompressed image.
|
||||
#COMPRESSION="zstd"
|
||||
#COMPRESSION="gzip"
|
||||
#COMPRESSION="bzip2"
|
||||
#COMPRESSION="lzma"
|
||||
#COMPRESSION="xz"
|
||||
#COMPRESSION="lzop"
|
||||
#COMPRESSION="lz4"
|
||||
|
||||
# COMPRESSION_OPTIONS
|
||||
# Additional options for the compressor
|
||||
#COMPRESSION_OPTIONS=()
|
||||
|
||||
# MODULES_DECOMPRESS
|
||||
# Decompress loadable kernel modules and their firmware during initramfs
|
||||
# creation. Switch (yes/no).
|
||||
# Enable to allow further decreasing image size when using high compression
|
||||
# (e.g. xz -9e or zstd --long --ultra -22) at the expense of increased RAM usage
|
||||
# at early boot.
|
||||
# Note that any compressed files will be placed in the uncompressed early CPIO
|
||||
# to avoid double compression.
|
||||
#MODULES_DECOMPRESS="no"
|
100
etc/pacman.conf
Normal file
100
etc/pacman.conf
Normal file
|
@ -0,0 +1,100 @@
|
|||
#
|
||||
# /etc/pacman.conf
|
||||
#
|
||||
# See the pacman.conf(5) manpage for option and repository directives
|
||||
|
||||
#
|
||||
# GENERAL OPTIONS
|
||||
#
|
||||
[options]
|
||||
# The following paths are commented out with their default values listed.
|
||||
# If you wish to use different paths, uncomment and update the paths.
|
||||
#RootDir = /
|
||||
#DBPath = /var/lib/pacman/
|
||||
#CacheDir = /var/cache/pacman/pkg/
|
||||
#LogFile = /var/log/pacman.log
|
||||
#GPGDir = /etc/pacman.d/gnupg/
|
||||
#HookDir = /etc/pacman.d/hooks/
|
||||
HoldPkg = pacman glibc
|
||||
#XferCommand = /usr/bin/curl -L -C - -f -o %o %u
|
||||
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
|
||||
#CleanMethod = KeepInstalled
|
||||
Architecture = auto
|
||||
|
||||
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
|
||||
#IgnorePkg =
|
||||
#IgnoreGroup =
|
||||
|
||||
#NoUpgrade =
|
||||
#NoExtract =
|
||||
|
||||
# Misc options
|
||||
#UseSyslog
|
||||
Color
|
||||
#NoProgressBar
|
||||
CheckSpace
|
||||
#VerbosePkgLists
|
||||
ParallelDownloads = 5
|
||||
DownloadUser = alpm
|
||||
#DisableSandbox
|
||||
ILoveCandy
|
||||
|
||||
# By default, pacman accepts packages signed by keys that its local keyring
|
||||
# trusts (see pacman-key and its man page), as well as unsigned packages.
|
||||
SigLevel = Required DatabaseOptional
|
||||
LocalFileSigLevel = Optional
|
||||
#RemoteFileSigLevel = Required
|
||||
|
||||
# NOTE: You must run `pacman-key --init` before first using pacman; the local
|
||||
# keyring can then be populated with the keys of all official Arch Linux
|
||||
# packagers with `pacman-key --populate archlinux`.
|
||||
|
||||
#
|
||||
# REPOSITORIES
|
||||
# - can be defined here or included from another file
|
||||
# - pacman will search repositories in the order defined here
|
||||
# - local/custom mirrors can be added here or in separate files
|
||||
# - repositories listed first will take precedence when packages
|
||||
# have identical names, regardless of version number
|
||||
# - URLs will have $repo replaced by the name of the current repo
|
||||
# - URLs will have $arch replaced by the name of the architecture
|
||||
#
|
||||
# Repository entries are of the format:
|
||||
# [repo-name]
|
||||
# Server = ServerName
|
||||
# Include = IncludePath
|
||||
#
|
||||
# The header [repo-name] is crucial - it must be present and
|
||||
# uncommented to enable the repo.
|
||||
#
|
||||
|
||||
# The testing repositories are disabled by default. To enable, uncomment the
|
||||
# repo name header and Include lines. You can add preferred servers immediately
|
||||
# after the header, and they will be used before the default mirrors.
|
||||
|
||||
#[core-testing]
|
||||
#Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
[core]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
#[extra-testing]
|
||||
#Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
[extra]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
# If you want to run 32 bit applications on your x86_64 system,
|
||||
# enable the multilib repositories as required here.
|
||||
|
||||
#[multilib-testing]
|
||||
#Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
#[multilib]
|
||||
#Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
# An example of a custom package repository. See the pacman manpage for
|
||||
# tips on creating your own repositories.
|
||||
#[custom]
|
||||
#SigLevel = Optional TrustAll
|
||||
#Server = file:///home/custompkgs
|
7
etc/pam.d/system-local-login
Normal file
7
etc/pam.d/system-local-login
Normal file
|
@ -0,0 +1,7 @@
|
|||
#%PAM-1.0
|
||||
|
||||
auth sufficient pam_fprintd.so
|
||||
auth include system-login
|
||||
account include system-login
|
||||
password include system-login
|
||||
session include system-login
|
47
etc/rc.conf
47
etc/rc.conf
|
@ -1,47 +0,0 @@
|
|||
# /etc/rc.conf - system configuration for void
|
||||
|
||||
# Set the host name.
|
||||
#
|
||||
# NOTE: it's preferred to declare the hostname in /etc/hostname instead:
|
||||
# - echo myhost > /etc/hostname
|
||||
#
|
||||
#HOSTNAME="void-live"
|
||||
|
||||
# Set RTC to UTC or localtime.
|
||||
#HARDWARECLOCK="UTC"
|
||||
|
||||
# Set timezone, availables timezones can be found at /usr/share/zoneinfo.
|
||||
#
|
||||
# NOTE: it's preferred to set the timezone in /etc/localtime instead:
|
||||
# - ln -sf /usr/share/zoneinfo/<timezone> /etc/localtime
|
||||
# Setting the timezone here requires a reboot to apply any changes/fixes
|
||||
# and read-write access to the filesystem.
|
||||
#
|
||||
#TIMEZONE="Europe/Madrid"
|
||||
|
||||
# Keymap to load, see loadkeys(8).
|
||||
#KEYMAP="es"
|
||||
|
||||
# Console font to load, see setfont(8).
|
||||
#FONT="lat9w-16"
|
||||
|
||||
# Console map to load, see setfont(8).
|
||||
#FONT_MAP=
|
||||
|
||||
# Font unimap to load, see setfont(8).
|
||||
#FONT_UNIMAP=
|
||||
|
||||
# Amount of ttys which should be setup.
|
||||
#TTYS=
|
||||
|
||||
# Set the mode for cgroup mounts.
|
||||
# hybrid: mount cgroup v1 under /sys/fs/cgroup and
|
||||
# cgroup v2 under /sys/fs/cgroup/unified
|
||||
# legacy: mount cgroup v1 /sys/fs/cgroup
|
||||
# unified: mount cgroup v2 under /sys/fs/cgroup
|
||||
CGROUP_MODE=unified
|
||||
|
||||
# Set this to true only if you do not want seed files to actually credit the
|
||||
# RNG, for example if you plan to replicate this file system image and do not
|
||||
# have the wherewithal to first delete the contents of /var/lib/seedrng.
|
||||
#SEEDRNG_SKIP_CREDIT=false
|
|
@ -1,6 +0,0 @@
|
|||
#!/bin/sh
|
||||
# Default rc.local for void; add your custom commands here.
|
||||
#
|
||||
# This is run by runit in stage 2 before the services are executed
|
||||
# (see /etc/runit/2).
|
||||
mount --make-rshared /
|
|
@ -1,14 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
export USER="drk"
|
||||
export HOME="/home/$USER"
|
||||
export XDG_RUNTIME_DIR="/run/user/$(id -u $USER)"
|
||||
mkdir $XDG_RUNTIME_DIR
|
||||
chown $USER:$USER $XDG_RUNTIME_DIR
|
||||
|
||||
groups="$(id -Gn "$USER" | tr ' ' ':')"
|
||||
svdir="$HOME/.config/runit/service"
|
||||
mkdir -p "$svdir"
|
||||
chown $USER:$USER "$svdir"
|
||||
|
||||
exec chpst -u "$USER:$groups" runsvdir "$svdir"
|
1
etc/vconsole.conf
Normal file
1
etc/vconsole.conf
Normal file
|
@ -0,0 +1 @@
|
|||
FONT=ter-118n
|
|
@ -35,7 +35,7 @@ export GOPATH="$XDG_DATA_HOME/go"
|
|||
export CARGO_HOME="$XDG_DATA_HOME/cargo"
|
||||
|
||||
## Flutter
|
||||
export CHROME_EXECUTABLE="/var/lib/flatpak/app/io.github.ungoogled_software.ungoogled_chromium/x86_64/stable/active/export/bin/io.github.ungoogled_software.ungoogled_chromium"
|
||||
export CHROME_EXECUTABLE="/var/lib/flatpak/app/com.brave.Browser/x86_64/stable/active/export/bin/com.brave.Browser"
|
||||
export PUB_CACHE="$XDG_DATA_HOME/pub-cache"
|
||||
export FLUTTER_ROOT="$XDG_LIB_HOME/flutter"
|
||||
export FLUTTER_ANALYTICS_DISABLED=true
|
||||
|
@ -47,7 +47,7 @@ export ANDROID_SDK_ROOT="$ANDROID_HOME"
|
|||
export ANDROID_USER_HOME="$XDG_DATA_HOME/android"
|
||||
export ANDROID_EMULATOR_HOME="$ANDROID_USER_HOME"
|
||||
export ANDROID_AVD_HOME="$ANDROID_USER_HOME/avd"
|
||||
export JAVA_HOME="/usr/lib/jvm/openjdk21"
|
||||
export JAVA_HOME="/usr/lib/jvm/jre-21-openjdk"
|
||||
export GRADLE_USER_HOME="$XDG_DATA_HOME/gradle"
|
||||
|
||||
# Set path
|
||||
|
@ -103,6 +103,10 @@ if [ -d "$XDG_DATA_HOME/JetBrains/Toolbox/scripts" ]; then
|
|||
PATH="$XDG_DATA_HOME/JetBrains/Toolbox/scripts:$PATH"
|
||||
fi
|
||||
|
||||
if [ -d "$XDG_CONFIG_HOME/sway/scripts" ]; then
|
||||
PATH="$XDG_CONFIG_HOME/sway/scripts:$PATH"
|
||||
fi
|
||||
|
||||
# Create config directories if they don't exist
|
||||
if [ ! -d "$WGETDIR" ] || [ ! -d "$GNUPGHOME" ]; then
|
||||
mkdir -p "$WGETDIR" "$GNUPGHOME"
|
||||
|
@ -113,6 +117,6 @@ source "$BASHRC"
|
|||
|
||||
# Starting wayland session
|
||||
if [ -z "$DISPLAY" ] && [ "$(tty)" = "/dev/tty1" ]; then
|
||||
sh "$HOME/.config/sway/scripts/init" &>/dev/null
|
||||
startsway &>/dev/null
|
||||
logout
|
||||
fi
|
||||
|
|
21
home/.bashrc
21
home/.bashrc
|
@ -3,7 +3,7 @@ export TERM="xterm-256color" # getting proper colors
|
|||
export HISTCONTROL=ignoredups:erasedups # no duplicate entries
|
||||
|
||||
### "bat" as manpager
|
||||
export MANPAGER="batman"
|
||||
export MANPAGER="sh -c 'sed -u -e \"s/\\x1B\[[0-9;]*m//g; s/.\\x08//g\" | bat -p -lman'"
|
||||
|
||||
# use bash-completion, if available
|
||||
[[ $PS1 && -f /usr/share/bash-completion/bash_completion ]] && \
|
||||
|
@ -126,15 +126,14 @@ fi
|
|||
lt="eza --icons -aT --color=always --group-directories-first" \
|
||||
l.='eza --icons -a | grep -E "^\."'
|
||||
|
||||
# package management
|
||||
# function to detect os and assign aliases to package managers
|
||||
alias \
|
||||
xbu="sudo xbps-install -Su" \
|
||||
xbi="sudo xbps-install -S" \
|
||||
xbr="sudo xbps-remove -R" \
|
||||
xbrs="sudo xbps-remove" \
|
||||
xbc="sudo xbps-remove -Oo" \
|
||||
xbs="sudo xbps-query -R"
|
||||
pku="sudo pacman -Syu" \
|
||||
pki="sudo pacman -S" \
|
||||
pkr="sudo pacman -Rcns" \
|
||||
pks="sudo pacman -Ss"
|
||||
|
||||
#pkg-clean="sudo pacman -R $(pacman -Qtds)" \
|
||||
# colorize grep output (good for log files)
|
||||
alias \
|
||||
grep="grep --color=auto" \
|
||||
|
@ -176,9 +175,9 @@ alias \
|
|||
|
||||
# power management
|
||||
alias \
|
||||
po="loginctl poweroff" \
|
||||
sp="loginctl suspend" \
|
||||
rb="loginctl reboot"
|
||||
po="systemctl poweroff" \
|
||||
sp="systemctl suspend" \
|
||||
rb="systemctl reboot"
|
||||
|
||||
# file management
|
||||
alias \
|
||||
|
|
Loading…
Reference in a new issue