update doom config and add dekstop zshrc

This commit is contained in:
ksyasuda 2021-10-28 18:25:26 -07:00
parent 18c082509f
commit 9c90714b24
4 changed files with 100 additions and 165 deletions

View File

@ -22,7 +22,7 @@
;; (setq doom-font (font-spec :family "monospace" :size 12 :weight 'semi-light) ;; (setq doom-font (font-spec :family "monospace" :size 12 :weight 'semi-light)
;; doom-variable-pitch-font (font-spec :family "sans" :size 13)) ;; doom-variable-pitch-font (font-spec :family "sans" :size 13))
;; (setq doom-font (font-spec :family "FiraCode Nerd Font" :size 14)) ;; (setq doom-font (font-spec :family "FiraCode Nerd Font" :size 14))
(setq doom-font (font-spec :family "mononoki Nerd Font Mono" :size 16)) (setq doom-font (font-spec :family "mononoki Nerd Font Mono" :size 18))
;; There are two ways to load a theme. Both assume the theme is installed and ;; There are two ways to load a theme. Both assume the theme is installed and
;; available. You can either set `doom-theme' or manually load a theme with the ;; available. You can either set `doom-theme' or manually load a theme with the
@ -66,11 +66,7 @@
;; ;;
;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how ;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how
;; they are implemented. ;; they are implemented.
(after! company
(setq +lsp-company-backends '(company-tabnine :separate company-capf company-yasnippet))
(setq company-show-quick-access t)
(setq company-idle-delay 0)
)
(use-package! lsp (use-package! lsp
:init :init
@ -80,46 +76,32 @@
(setq lsp-pyls-plugins-pyflakes-enabled t) (setq lsp-pyls-plugins-pyflakes-enabled t)
) )
(after! lsp-python-ms
(set-lsp-priority! 'mspyls 1)) (use-package! lsp-mode
:commands lsp
:hook
(sh-mode . 'lsp))
(add-hook 'python-mode 'python-pylint)
(add-hook 'sh-mode-hook 'flycheck-mode)
; enable bash language server
;(setq lsp-auto-configure nil)
(add-hook 'org-mode-hook #'org-bullets-mode) (add-hook 'org-mode-hook #'org-bullets-mode)
(add-hook 'before-save-hook 'py-isort-before-save) (add-hook 'before-save-hook 'py-isort-before-save)
(setq python-shell-interpreter "ipython" ;; (setq python-shell-interpreter "ipython"
python-shell-interpreter-args "-i --simple-prompt --InteractiveShell.display_page=True") ;; python-shell-interpreter-args "-i --simple-prompt --InteractiveShell.display_page=True")
(flycheck-define-checker python-pycoverage
"A Python test coverage checker using the pycoverage tool.
See `https://github.com/mattharrison/pycoverage.el'.
This works after pytest has run by marking lines missing
coverage (as reported by pytest) as flycheck issues. If the code
was updated after pytest was run then nothing is reported.
"
:command
("python" "-c"
(eval
(mapconcat 'identity
(list
"import sys"
(format "sys.path.insert(0, '%scov2emacs')" (file-name-directory (locate-library "pycoverage")))
"from cov2emacslib.__init__ import main"
"main(sys.argv[1:])")
";"))
"--compile-mode" "--python-file" source-original)
:error-patterns ((warning line-start (file-name) ":" line ":" (message) line-end))
:modes (python-mode))
(org-babel-do-load-languages (org-babel-do-load-languages
'org-babel-load-languages 'org-babel-load-languages
'((python . t))) '((python . t)))
(setq projectile-project-search-path '("~/Projects/" "~/Work/Projects/"))
(setf (lsp-session-folders-blacklist (lsp-session)) nil) (setf (lsp-session-folders-blacklist (lsp-session)) nil)
(lsp--persist-session (lsp-session)) (lsp--persist-session (lsp-session))
@ -136,3 +118,26 @@ was updated after pytest was run then nothing is reported.
:bind (:map dired-mode-map :bind (:map dired-mode-map
("P" . peep-dired))) ("P" . peep-dired)))
(use-package! company-tabnine :ensure t)
(after! company
(setq +lsp-company-backends '(company-tabnine :separate company-capf company-yasnippet))
(setq company-show-quick-access t)
(setq company-idle-delay 0)
)
(require 'company-tabnine)
(use-package! lsp-jedi
:ensure t)
;; :config
;; (with-eval-after-load "lsp-mode"
; (add-to-list 'lsp-disabled-clients 'pyls)
;; (add-to-list 'lsp-enabled-clients 'jedi)))
;; (defun my/python-mode-hook ()
;; (add-to-list 'company-backends 'company-jedi))
(add-to-list 'company-backends 'company-shell)

View File

@ -162,7 +162,7 @@
;;rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap() ;;rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
;;scala ; java, but good ;;scala ; java, but good
;;(scheme +guile) ; a fully conniving family of lisps ;;(scheme +guile) ; a fully conniving family of lisps
sh ; she sells {ba,z,fi}sh shells on the C xor (sh +lsp) ; she sells {ba,z,fi}sh shells on the C xor
;;sml ;;sml
;;solidity ; do you need a blockchain? No. ;;solidity ; do you need a blockchain? No.
;;swift ; who asked for emoji variables? ;;swift ; who asked for emoji variables?

View File

@ -48,7 +48,13 @@
;(unpin! pinned-package another-pinned-package) ;(unpin! pinned-package another-pinned-package)
;; ...Or *all* packages (NOT RECOMMENDED; will likely break things) ;; ...Or *all* packages (NOT RECOMMENDED; will likely break things)
;(unpin! t) ;(unpin! t)
(package! company-mode)
(package! lsp-jedi)
(package! company-jedi)
(package! flycheck)
(package! company-tabnine :recipe (:host github :repo "TommyX12/company-tabnine")) (package! company-tabnine :recipe (:host github :repo "TommyX12/company-tabnine"))
(package! org-bullets) (package! org-bullets)
(package! wakatime-mode) (package! wakatime-mode)

View File

@ -1,3 +1,5 @@
# ZSH_THEME="spaceship" # set by `omz`
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. # Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n] # Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block, everything else may go below. # confirmations, etc.) must go above this block, everything else may go below.
@ -8,7 +10,6 @@ fi
#If you come from bash you might have to change your $PATH. #If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH # export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/home/sudacode/.oh-my-zsh" export ZSH="/home/sudacode/.oh-my-zsh"
export PATH="$HOME/scripts:$PATH" export PATH="$HOME/scripts:$PATH"
export PATH="$HOME/Work/scripts:$PATH" export PATH="$HOME/Work/scripts:$PATH"
@ -16,7 +17,6 @@ export PATH="$HOME/projects/Python/get_song/src/:$PATH"
export EDITOR=vim export EDITOR=vim
export VISUAL=vim export VISUAL=vim
if [ -f ~/.bash_aliases ]; then if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases . ~/.bash_aliases
fi fi
@ -25,6 +25,10 @@ if [ -f ~/.aliases ]; then
. ~/.aliases . ~/.aliases
fi fi
if [ -f ~/Work/.aliases ]; then
. ~/Work/.aliases
fi
#POWERLEVEL9K_MODE='nerdfont' #POWERLEVEL9K_MODE='nerdfont'
#POWERLEVEL9K_MODE='awesome-fontconfig' #POWERLEVEL9K_MODE='awesome-fontconfig'
@ -37,8 +41,9 @@ POWERLEVEL9K_MODE='nerdfont-complete'
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes # See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
#ZSH_THEME="powerlevel9k/powerlevel9k" #ZSH_THEME="powerlevel9k/powerlevel9k"
ZSH_THEME="powerlevel10k/powerlevel10k" ZSH_THEME="powerlevel10k/powerlevel10k"
#ZSH_THEME="random" # ZSH_THEME="random" # set by `omz`
#ZSH_THEME="agnoster" #ZSH_THEME="agnoster"
# ZSH_THEMES="spaceship"
# Set list of themes to pick from when loading at random # Set list of themes to pick from when loading at random
# Setting this variable when ZSH_THEME=random will cause zsh to load # Setting this variable when ZSH_THEME=random will cause zsh to load
@ -102,7 +107,7 @@ HISTCONTROL=ignoreboth
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ # Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse) # Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup. # Add wisely, as too many plugins slow down shell startup.
plugins=(zsh-autosuggestions zsh-syntax-highlighting colored-man-pages zsh-256color vi-mode) plugins=(zsh-autosuggestions zsh-syntax-highlighting colored-man-pages vi-mode)
source $ZSH/oh-my-zsh.sh source $ZSH/oh-my-zsh.sh
#source ~/.oh-my-zsh/plugins/git/git.plugin.zsh #source ~/.oh-my-zsh/plugins/git/git.plugin.zsh
@ -137,49 +142,6 @@ export ARCHFLAGS="-arch x86_64"
export PATH=$PATH:/home/linuxbrew/.linuxbrew/bin export PATH=$PATH:/home/linuxbrew/.linuxbrew/bin
# ------------------------------------- POWERLINE CONFIG ----------------------
#POWERLEVEL9K_OS_ICON_BACKGROUND="white"
#POWERLEVEL9K_OS_ICON_FOREGROUND="blue"
POWERLEVEL9K_PROMPT_ON_NEWLINE=true
POWERLEVEL9K_RPROMPT_ON_NEWLINE=false
#POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(os_icon time battery context dir vcs newline)
#POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(os_icon battery context newline dir vcs)
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(time status root_indicator background_jobs history)
POWERLEVEL9K_DISABLE_RPROMPT=false
POWERLEVEL9K_TIME_BACKGROUND='117'
POWERLEVEL9K_SHORTEN_DIR_LENGTH=3
#POWERLEVEL9K_CUSTOM_NOW_PLAYING='~/.nowplaying'
#POWERLEVEL9K_CUSTOM_NOW_PLAYING_BACKGROUND='blue'
#POWERLEVEL9K_CUSTOM_NOW_PLAYING_FOREGROUND='black'
# Icons
OS_ICON=' Yawnick boi: ﴑ'
POWERLEVEL9K_OS_ICON_BACKGROUND='208'
POWERLEVEL9K_OS_ICON_FOREGROUND='000'
POWERLEVEL9K_VCS_GIT_GITHUB_ICON=' '
POWERLEVEL9K_USER_ICON="\uF415" # 
POWERLEVEL9K_USER_DEFAULT_BACKGROUND='199'
zsh_wifi_signal(){
local signal=$(nmcli device wifi | grep yes | awk '{print $8}')
local color='%F{yellow}'
[[ $signal -gt 75 ]] && color='%F{green}'
[[ $signal -lt 50 ]] && color='%F{red}'
echo -n "%{$color%}\uf230 $signal%{%f%}" # \uf230 is 
}
POWERLEVEL9K_CUSTOM_WIFI_SIGNAL="zsh_wifi_signal"
#POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(os_icon time user dir vcs virtualenv)
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(battery user dir vcs virtualenv)
POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX='↱'
POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX='↳  Yawnick boi : ﴑ '
POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX_BACKGROUND='208'
POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX_FOREGROUND='000'
#POWERLEVEL9K_TIME_FORMAT="%D{%H:%M:%S \uE868 %d.%m.%y}"
# set battery stages and colors # set battery stages and colors
POWERLEVEL9K_BATTERY_STAGES=( POWERLEVEL9K_BATTERY_STAGES=(
$'▏ ▏' $'▎ ▏' $'▍ ▏' $'▌ ▏' $'▋ ▏' $'▊ ▏' $'▉ ▏' $'█ ▏' $'▏ ▏' $'▎ ▏' $'▍ ▏' $'▌ ▏' $'▋ ▏' $'▊ ▏' $'▉ ▏' $'█ ▏'
@ -196,40 +158,7 @@ POWERLEVEL9K_BATTERY_DISCONNECTED_FOREGROUND='021'
POWERLEVEL9K_BATTERY_LOW_THRESHOLD=20 POWERLEVEL9K_BATTERY_LOW_THRESHOLD=20
POWERLEVEL9K_BATTERY_VERBOSE=true POWERLEVEL9K_BATTERY_VERBOSE=true
# Set 'context' segment colors LS_COLORS="di=42;1;90:*.mp3=1;32;41:fi=0;91:*.c=1;96:*.js=1;93:*.h=1;35:ex=1;32:*.html=1;36:*.cpp=1;96:*.txt=1;91:*Makefile=1;95:*.css=1;36:*.as=1;36:ow=1;42;93:*.ttf=0;91:*.png=0;91:*README=4;31:*.jpg=0;91:*.md=4;31:*.json=1;94:*.as=0;35:*.obj=0;35:*.correct=1;94:*.py=1;91:*.ipynb=3;91"
POWERLEVEL9K_CONTEXT_DEFAULT_FOREGROUND='010'
POWERLEVEL9K_CONTEXT_DEFAULT_BACKGROUND='128'
# Set directory icons
POWERLEVEL9K_HOME_ICON='🏠'
POWERLEVEL9K_HOME_SUB_ICON='📂'
# Set dir path colors
#POWERLEVEL9K_DIR_PATH_HIGHLIGHT_BOLD=true
POWERLEVEL9K_DIR_DEFAULT_BACKGROUND='033'
POWERLEVEL9K_DIR_DEFAULT_FOREGROUND='016'
POWERLEVEL9K_DIR_HOME_BACKGROUND='033'
POWERLEVEL9K_DIR_HOME_FOREGROUND='016'
POWERLEVEL9K_DIR_PATH_HILIGHT_FOREGROUND='000'
POWERLEVEL9K_DIR_HOME_SUBFOLDER_BACKGROUND='033'
POWERLEVEL9K_DIR_HOME_SUBFOLDER_FOREGROUND='016'
POWERLEVEL9K_DIR_NOT_WRITABLE_BACKGROUND='196'
POWERLEVEL9K_DIR_NOT_WRITABLE_FOREGROUND='016'
# Git configurations
POWERLEVEL9K_SHOW_CHANGESET=true
POWERLEVEL9K_VCS_CLEAN_FOREGROUND='233'
#POWERLEVEL9K_VCS_CLEAN_BACKGROUND='black'
POWERLEVEL9K_VCS_UNTRACKED_FOREGROUND='033'
#POWERLEVEL9K_VCS_UNTRACKED_BACKGROUND='black'
POWERLEVEL9K_VCS_MODIFIED_FOREGROUND='197'
#POWERLEVEL9K_VCS_MODIFIED_BACKGROUND='black'
#! -----------------------------------END OF POWERLEVEL CONFIG------------------
#LS_COLORS="di=42;1;30:*.mp3=1;32;41:fi=0;91:*.c=1;96:*.js=1;93:*.h=1;35:ex=1;32:*.html=1;36:*.cpp=1;96:*.txt=1;91:*Makefile=1;35:*.css=1;36:*.as=1;36:ow=1;42;93:*.ttf=0;91:*.png=0;91:*README=4;31:*.jpg=0;91:*.md=4;31:*.json=1;94:*.as=0;35:*.obj=0;35:*.correct=1;94"
LS_COLORS="di=42;1;94:*.mp3=1;32;41:fi=0;91:*.c=1;96:*.js=1;93:*.h=1;35:ex=1;32:*.html=1;36:*.cpp=1;96:*.txt=1;91:*Makefile=1;95:*.css=1;36:*.as=1;36:ow=1;42;93:*.ttf=0;91:*.png=0;91:*README=4;31:*.jpg=0;91:*.md=4;31:*.json=1;94:*.as=0;35:*.obj=0;35:*.correct=1;94"
# # ex = EXtractor for all kinds of archives # # ex = EXtractor for all kinds of archives
# # usage: ex <file> # # usage: ex <file>
@ -270,6 +199,17 @@ codi() {
Codi $syntax" "$@" Codi $syntax" "$@"
} }
get_git_commit_hash() {
git rev-parse HEAD | cut -c -12
}
export SPACESHIP_TIME_SHOW=true
export SPACESHIP_GCLOUD_SHOW=false
export SPACESHIP_EXIT_CODE_SHOW=true
export SPACESHIP_TIME_COLOR=blue
export SPACESHIP_VENV_PREFIX=" "
export SPACESHIP_DIR_TRUNC=0
# eval spaceship_vi_mode_enable
### for use with xserver... causes screenfetch and neofetch to not work unless xserver is running ### for use with xserver... causes screenfetch and neofetch to not work unless xserver is running
#export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2}'):0.0 #export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2}'):0.0
@ -278,63 +218,45 @@ codi() {
PS2="===>" PS2="===>"
# Add gem to PATH # # Add gem to PATH
export PATH=$PATH:/home/sudacode/.gem/ruby/2.7.0/bin # export PATH=$PATH:/home/sudacode/.gem/ruby/2.7.0/bin
#
# Add go to PATH # # Add go to PATH
export PATH=$PATH:/home/sudacode/go/bin # export PATH=$PATH:/home/sudacode/go/bin
#
alias freud='cd /home/sudacode/' # alias freud='cd /home/sudacode/'
#
# Add yarn to PATH # # Add yarn to PATH
export PATH="$PATH:`yarn global bin`" # export PATH="$PATH:`yarn global bin`"
#
# set terminal color to 256 color # # set terminal color to 256 color
export TERM=xterm-256color # export TERM=xterm-256color
#
export PATH=$PATH:/home/sudacode/.local/bin # export PATH=$PATH:/home/sudacode/.local/bin
#
# add emacs to path # add emacs to path
export PATH=$PATH:/home/sudacode/.emacs.d/bin export PATH=$PATH:/home/sudacode/.emacs.d/bin
#
#Enable tab completions for flags in colorls #Enable tab completions for flags in colorls
source $(dirname $(gem which colorls))/tab_complete.sh source $(dirname $(gem which colorls))/tab_complete.sh
#
# add pythno to PATH # # add pythno to PATH
export PATH="$PATH:/usr/bin/python" # export PATH="$PATH:/usr/bin/python"
#
# add jdk-8 to path # # add jdk-8 to path
export PATH="$PATH:/usr/lib/jvm/java-8-openjdk/bin" # export PATH="$PATH:/usr/lib/jvm/java-8-openjdk/bin"
export CLASSPATH="$CLASSPATH:/usr/share/java/mariadb-jdbc/mariadb-java-client.jar" # export CLASSPATH="$CLASSPATH:/usr/share/java/mariadb-jdbc/mariadb-java-client.jar"
## ibus config ## ibus config
export GTK_IM_MODULE=ibus # export GTK_IM_MODULE=ibus
# will make libreoffice work # # will make libreoffice work
export XMODIFIERS=@im=ibus # export XMODIFIERS=@im=ibus
export QT_IM_MODULE=ibus # export QT_IM_MODULE=ibus
export QT4_IM_MODULE=xim # export QT4_IM_MODULE=xim
ibus-daemon -drx # ibus-daemon -drx
export GTK_IM_MODULE_FILE=/etc/gtk-2.0/gtk.immodules
export GTK_IM_MODULE_FILE=/usr/lib/gtk-3.0/3.0.0/immodules.cache
export VISUAL=vim export VISUAL=vim
export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket" export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket"
export ORACLE_HOME=/usr
export TNS_ADMIN=/etc/tnsnames.ora
export GDK_SCALE=2
# rdesktop use cursor
# export XCURSOR_DISCOVER=1 rdesktop
# set qt scale factor
export QT_AUTO_SCREEN_SCALE_FACTOR=1.5
# export QT_FONT_DPI=196 vym
# source the Xmodmap file to get custom keybindings # source the Xmodmap file to get custom keybindings
# [[ -f ~/.Xmodmap ]] && xmodmap ~/.Xmodmap # [[ -f ~/.Xmodmap ]] && xmodmap ~/.Xmodmap
@ -357,3 +279,5 @@ export QT_AUTO_SCREEN_SCALE_FACTOR=1.5
# fi # fi
# unset __conda_setup # unset __conda_setup
# # <<< conda initialize <<< # # <<< conda initialize <<<
# neofetch