mirror of
https://github.com/olexsmir/dotfiles.git
synced 2026-01-15 16:51:34 +02:00
Add doom emacs config
This commit is contained in:
parent
e3c86138ef
commit
70e19a1b38
10 changed files with 218 additions and 63 deletions
13
bin/catfetch
13
bin/catfetch
|
|
@ -12,18 +12,17 @@ kernel=$(cat /proc/sys/kernel/osrelease|cut -d '-' -f1)
|
||||||
shell=$(basename $SHELL)
|
shell=$(basename $SHELL)
|
||||||
|
|
||||||
# Pakages
|
# Pakages
|
||||||
manager=$(which dnf apt pacman apk yay xbps-query 2>/dev/null)
|
manager=$(which apt pacman yay apk xbps-query 2>/dev/null)
|
||||||
manager=${manager##*/}
|
manager=${manager##*/}
|
||||||
case "$manager" in
|
case "$manager" in
|
||||||
apt) packages="$(dpkg-query -f '${binary:Package}\n' -W | wc -l)";;
|
apt) packages="$(dpkg-query -f '${binary:Package}\n' -W | wc -l)";;
|
||||||
pacman) packages="$(pacman -Q | wc -l)";;
|
pacman) packages="$(pacman -Q | wc -l)";;
|
||||||
apk) packages="$(apk list --installed | wc -l)";;
|
|
||||||
yay) packages="$(yay -Q | wc -l)";;
|
yay) packages="$(yay -Q | wc -l)";;
|
||||||
|
apk) packages="$(apk list --installed | wc -l)";;
|
||||||
xbps-query) packages="$(xbps-query -l | wc -l)";;
|
xbps-query) packages="$(xbps-query -l | wc -l)";;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Colors ####
|
# Colors ####
|
||||||
bold="\e[1m"
|
bold="\e[1m"
|
||||||
reset="\e[0m"
|
reset="\e[0m"
|
||||||
|
|
@ -39,9 +38,9 @@ magenta='\e[35m'
|
||||||
cyan='\e[36m'
|
cyan='\e[36m'
|
||||||
white='\e[37m'
|
white='\e[37m'
|
||||||
|
|
||||||
echo -e " ${blue}${bold} WM ${reset}${wmname}"
|
echo -e " ${blue}${bold} WM ${reset}${wmname}"
|
||||||
echo -e " /\_/\ ${blue}${bold} SHELL ${reset}${shell}"
|
echo -e " /\_/\ ${blue}${bold} SHELL ${reset}${shell}"
|
||||||
echo -e " (=^.^=) ${blue}${bold}KERNEL ${reset}${kernel}"
|
echo -e " (=^.^=) ${blue}${bold}KERNEL ${reset}${kernel}"
|
||||||
echo -e " (\") (\")_/ ${blue}${bold} PKG ${reset}${packages}"
|
echo -e " (\") (\")_/ ${blue}${bold} PKG ${reset}${packages}"
|
||||||
echo -e " ${black}卑${red}卑${green}卑${yellow}卑${blue}卑${magenta}卑${cyan}卑${reset} "
|
echo -e " ${black}卑${red}卑${green}卑${yellow}卑${blue}卑${magenta}卑${cyan}卑${reset} "
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
||||||
|
|
@ -25,9 +25,9 @@ exec --no-startup-id exec picom --experimental-backends -b
|
||||||
exec --no-startup-id exec nitrogen --restore
|
exec --no-startup-id exec nitrogen --restore
|
||||||
exec --no-startup-id exec setxkbmap "us,ua" ",winkeys" "grp:alt_shift_toggle" -option "ctrl:nocaps"
|
exec --no-startup-id exec setxkbmap "us,ua" ",winkeys" "grp:alt_shift_toggle" -option "ctrl:nocaps"
|
||||||
exec --no-startup-id exec org.telegram.desktop
|
exec --no-startup-id exec org.telegram.desktop
|
||||||
exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
|
exec --no-startup-id exec /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
|
||||||
exec --no-startup-id xautolock -time 3 -locker "betterlockscreen --off 180 -t \"Computer is lockerd\" -l"
|
exec_always --no-startup-id exec xautolock -time 3 -locker "betterlockscreen --off 180 -t \"Computer is lockerd\" -l"
|
||||||
exec_always --no-startup-id $HOME/.config/i3/bar.sh
|
exec_always --no-startup-id exec $HOME/.config/i3/bar.sh
|
||||||
#exec --no-startup-id exec conky
|
#exec --no-startup-id exec conky
|
||||||
#exec --no-startup-id exec redshift-gtk
|
#exec --no-startup-id exec redshift-gtk
|
||||||
#exec --no-startup-id exec discord
|
#exec --no-startup-id exec discord
|
||||||
|
|
|
||||||
8
doom.d/README.md
Normal file
8
doom.d/README.md
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
# Doom emacs
|
||||||
|
|
||||||
|
### Install
|
||||||
|
~~~bash
|
||||||
|
sudo pacman -S emacs ripgrep fd
|
||||||
|
git clone --depth 1 https://github.com/hlissner/doom-emacs ~/.emacs.d
|
||||||
|
~/.emacs.d/bin/doom install
|
||||||
|
~~~
|
||||||
6
doom.d/config.el
Normal file
6
doom.d/config.el
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
(setq user-full-name "Smirnov Alexandr"
|
||||||
|
user-mail-address "ss2316544@gmail.com")
|
||||||
|
|
||||||
|
(setq doom-theme 'doom-one)
|
||||||
|
(setq org-directory "~/org/")
|
||||||
|
(setq display-line-numbers-type t)
|
||||||
3
doom.d/custom.el
Normal file
3
doom.d/custom.el
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
(custom-set-variables
|
||||||
|
'(package-selected-packages '(zoutline)))
|
||||||
|
(custom-set-faces)
|
||||||
168
doom.d/init.el
Normal file
168
doom.d/init.el
Normal file
|
|
@ -0,0 +1,168 @@
|
||||||
|
(doom! :input
|
||||||
|
;;chinese
|
||||||
|
;;japanese
|
||||||
|
;;layout ; auie,ctsrnm is the superior home row
|
||||||
|
|
||||||
|
:completion
|
||||||
|
company ; the ultimate code completion backend
|
||||||
|
;;helm ; the *other* search engine for love and life
|
||||||
|
;;ido ; the other *other* search engine...
|
||||||
|
ivy ; a search engine for love and life
|
||||||
|
|
||||||
|
: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) ; 🙂
|
||||||
|
;;fill-column ; a `fill-column' indicator
|
||||||
|
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 ; 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 ; tasing you for misspelling mispelling
|
||||||
|
;;grammar ; tasing grammar mistake every you make
|
||||||
|
|
||||||
|
:tools
|
||||||
|
;;ansible
|
||||||
|
;;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)
|
||||||
|
;;gist ; interacting with github gists
|
||||||
|
lookup ; navigate your code and its documentation
|
||||||
|
lsp
|
||||||
|
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
|
||||||
|
;;upload ; map local to remote projects via ssh/ftp
|
||||||
|
|
||||||
|
:os
|
||||||
|
(:if IS-MAC macos) ; improve compatibility with macOS
|
||||||
|
tty ; improve the terminal Emacs experience
|
||||||
|
|
||||||
|
:lang
|
||||||
|
;;agda ; types of types of types of types...
|
||||||
|
;;cc ; C/C++/Obj-C madness
|
||||||
|
;;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
|
||||||
|
;;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
|
||||||
|
;;faust ; dsp, but you get to keep your soul
|
||||||
|
;;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
|
||||||
|
;;(haskell +dante) ; 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 +meghanada) ; 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
|
||||||
|
;;factor
|
||||||
|
;;ledger ; an accounting system in Emacs
|
||||||
|
;;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 ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
|
||||||
|
;;scala ; java, but good
|
||||||
|
;;scheme ; 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
|
||||||
|
|
||||||
|
:email
|
||||||
|
;;(mu4e +gmail)
|
||||||
|
;;notmuch
|
||||||
|
;;(wanderlust +gmail)
|
||||||
|
|
||||||
|
:app
|
||||||
|
;;calendar
|
||||||
|
;;irc ; how neckbeards socialize
|
||||||
|
;;(rss +org) ; emacs as an RSS reader
|
||||||
|
;;twitter ; twitter client https://twitter.com/vnought
|
||||||
|
|
||||||
|
:config
|
||||||
|
;;literate
|
||||||
|
(default +bindings +smartparens))
|
||||||
3
doom.d/packages.el
Normal file
3
doom.d/packages.el
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
(package! rainbow-mode)
|
||||||
|
(package! async)
|
||||||
|
(package! go-autocomplete)
|
||||||
|
|
@ -15,13 +15,7 @@ case "$choice" in
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
"Lock")
|
"Lock")
|
||||||
declare opt=("Yes\nNo")
|
exec betterlockscreen --off 300 -t "Computer is lockerd" -l ;;
|
||||||
yesno=$(echo -e "${opt[@]}" | dmenu -p 'Power' $@)
|
|
||||||
case "$yesno" in
|
|
||||||
"Yes") exec betterlockscreen --off 300 -t "Computer is lockerd" -l;;
|
|
||||||
"No") exec exit 0 ;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
"Logout")
|
"Logout")
|
||||||
declare opt=("Yes\nNo")
|
declare opt=("Yes\nNo")
|
||||||
yesno=$(echo -e "${opt[@]}" | dmenu -p 'Logout' $@)
|
yesno=$(echo -e "${opt[@]}" | dmenu -p 'Logout' $@)
|
||||||
|
|
|
||||||
|
|
@ -1,38 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
## WIFI SIGNAL
|
|
||||||
wifi() {
|
|
||||||
wifis=$(cat /proc/net/wireless | grep "wlp3s0" | awk '{print $4}' | grep -o '[0-9]*')
|
|
||||||
echo -e " $wifis%"
|
|
||||||
}
|
|
||||||
|
|
||||||
## RAM
|
|
||||||
mem() {
|
|
||||||
mem=`free | awk '/Mem/ {printf "%dM/%dM\n", $3 / 1024.0, $2 / 1024.0 }'`
|
|
||||||
echo -e "$mem"
|
|
||||||
}
|
|
||||||
|
|
||||||
## VOLUME
|
|
||||||
vol() {
|
|
||||||
vol=`amixer get Master | awk -F'[][]' 'END{ print $4":"$2 }' | sed 's/on://g'`
|
|
||||||
echo -e " $vol"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
## KEYBOARD
|
|
||||||
keyl() {
|
|
||||||
case "$(xkblayout)" in
|
|
||||||
Eng) date="us";;
|
|
||||||
Rus) date="ru";;
|
|
||||||
Ukr) date="ua";;
|
|
||||||
esac
|
|
||||||
echo -e " $date"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
SLEEP_SEC=0
|
|
||||||
while :; do
|
|
||||||
echo "+@fg=2;$(keyl) +@fg=0; +@fg=3;$(vol) +@fg=0; +@fg=4;$(wifi) +@fg=0;"
|
|
||||||
sleep $SLEEP_SEC
|
|
||||||
done
|
|
||||||
|
|
||||||
28
zshrc
28
zshrc
|
|
@ -17,7 +17,7 @@ ZSH_THEME="cyan-simple" # Set theme
|
||||||
export UPDATE_ZSH_DAYS=7 # Change how often to auto-update.
|
export UPDATE_ZSH_DAYS=7 # Change how often to auto-update.
|
||||||
export LANG=en_US.UTF-8 # Set locale
|
export LANG=en_US.UTF-8 # Set locale
|
||||||
|
|
||||||
plugins=(pip python golang pass sudo heroku git taskwarrior encode64)
|
plugins=(pip python golang pass emacs sudo heroku git taskwarrior encode64)
|
||||||
source $ZSH/oh-my-zsh.sh
|
source $ZSH/oh-my-zsh.sh
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -34,12 +34,6 @@ function bgcolor {
|
||||||
|
|
||||||
### Aliases ###
|
### Aliases ###
|
||||||
alias cls="clear"
|
alias cls="clear"
|
||||||
alias :q="exit"
|
|
||||||
alias :q!="exit"
|
|
||||||
alias q="exit"
|
|
||||||
alias :qw="exit"
|
|
||||||
alias tmux="tmux -2"
|
|
||||||
alias vim="nvim"
|
|
||||||
alias mkdir="mkdir -p"
|
alias mkdir="mkdir -p"
|
||||||
alias mkd="mkdir"
|
alias mkd="mkdir"
|
||||||
alias sl="ls"
|
alias sl="ls"
|
||||||
|
|
@ -48,12 +42,30 @@ alias du="du -sh"
|
||||||
alias df="df -h"
|
alias df="df -h"
|
||||||
alias lns="ln -s"
|
alias lns="ln -s"
|
||||||
alias uln="unlink"
|
alias uln="unlink"
|
||||||
|
|
||||||
|
# Program
|
||||||
|
alias vim="nvim"
|
||||||
|
alias tmux="tmux -2"
|
||||||
alias ipython="ipython --no-banner"
|
alias ipython="ipython --no-banner"
|
||||||
alias icat="kitty +kitten icat"
|
alias icat="kitty +kitten icat"
|
||||||
|
eval $(thefuck --alias)
|
||||||
|
|
||||||
|
# Exit
|
||||||
|
alias :q="exit"
|
||||||
|
alias :q!="exit"
|
||||||
|
alias q="exit"
|
||||||
|
alias :qw="exit"
|
||||||
|
|
||||||
|
# Navigation
|
||||||
alias ..="cd .."
|
alias ..="cd .."
|
||||||
alias ...="cd ../.."
|
alias ...="cd ../.."
|
||||||
alias .3="cd ../../.."
|
alias .3="cd ../../.."
|
||||||
alias .4="cd ../../../.."
|
alias .4="cd ../../../.."
|
||||||
alias .5="cd ../../../../.."
|
alias .5="cd ../../../../.."
|
||||||
alias .6="cd ../../../../../.."
|
alias .6="cd ../../../../../.."
|
||||||
eval $(thefuck --alias)
|
|
||||||
|
# Doom emacs
|
||||||
|
alias doomsync="$HOME/.emacs.d/bin/doom sync"
|
||||||
|
alias doomupgrade="$HOME/.emacs.d/bin/doom upgrade"
|
||||||
|
alias doomdoctor="$HOME/.emacs.d/bin/doom doctor"
|
||||||
|
alias doom="$HOME/.emacs.d/bin/doom"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue