diff --git a/.gitignore b/.gitignore index 64b4807..f6c282d 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,6 @@ nvim/.config/nvim/plugged* nvim/.config/nvim/undodir/* !nvim/.config/nvim/undodir/.gitkeep nvim/.local/share/nvim/shada* - +nvim/.config/coc* #exlude cache dir for oh-my-zsh zsh/.oh-my-zsh/cache/ diff --git a/dunst/.config/dunst/dunstrc b/dunst/.config/dunst/dunstrc index c796e81..a8c8c7c 100644 --- a/dunst/.config/dunst/dunstrc +++ b/dunst/.config/dunst/dunstrc @@ -86,7 +86,7 @@ ### Text ### - font = MesloLGS 16 + font = MesloLGS 14 # The spacing between lines. If the height is smaller than the # font height, it will get raised to the font height. diff --git a/dwm/.dwm/autostart.sh b/dwm/.dwm/autostart.sh index 1188783..391c656 100755 --- a/dwm/.dwm/autostart.sh +++ b/dwm/.dwm/autostart.sh @@ -1,6 +1,4 @@ #!/bin/sh -export PATH=$PATH:~/.local/bin - # Start dwmblocks as statusbar dwmblocks & diff --git a/nvim/.config/coc/extensions/db.json b/nvim/.config/coc/extensions/db.json deleted file mode 100644 index 9e26dfe..0000000 --- a/nvim/.config/coc/extensions/db.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/nvim/.config/coc/extensions/package.json b/nvim/.config/coc/extensions/package.json deleted file mode 100644 index feb69ef..0000000 --- a/nvim/.config/coc/extensions/package.json +++ /dev/null @@ -1 +0,0 @@ -{"dependencies":{}} \ No newline at end of file diff --git a/nvim/.config/coc/memos.json b/nvim/.config/coc/memos.json deleted file mode 100644 index 9e26dfe..0000000 --- a/nvim/.config/coc/memos.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/nvim/.config/nvim/init.vim b/nvim/.config/nvim/init.vim index 94b99b7..9deebad 100644 --- a/nvim/.config/nvim/init.vim +++ b/nvim/.config/nvim/init.vim @@ -17,7 +17,7 @@ set expandtab " Plugin stuff " call plug#begin() -Plug 'neoclide/coc.nvim', {'branch': 'release'} +Plug 'neoclide/coc.nvim', {'branch': 'release', 'do': { -> coc#util#install()}} Plug 'vim-airline/vim-airline' Plug 'preservim/nerdtree' Plug 'arcticicestudio/nord-vim' @@ -28,9 +28,28 @@ call plug#end() " colorscheme stuff " colorscheme nord +let g:vimsence_small_text = 'NeoVim' +let g:vimsence_small_image = 'neovim' +let g:vimsence_editing_details = 'Editing: {}' +let g:vimsence_editing_state = 'Working on: {}' + + " Keybinds " let mapleader = " " +"inoremap +" \ pumvisible() ? "\" : +" \ check_back_space() ? "\" : +" \ coc#refresh() +"inoremap pumvisible() ? "\" : "\" + +"function! s:check_back_space() abort +" let col = col('.') - 1 +" return !col || getline('.')[col - 1] =~# '\s' +"endfunction + +"inoremap coc#refresh() + nnoremap h :wincmd h nnoremap j :wincmd j nnoremap k :wincmd k diff --git a/zsh/.oh-my-zsh/cache/.zsh-update b/zsh/.oh-my-zsh/cache/.zsh-update index ad869b5..b31f7a5 100644 --- a/zsh/.oh-my-zsh/cache/.zsh-update +++ b/zsh/.oh-my-zsh/cache/.zsh-update @@ -1 +1 @@ -LAST_EPOCH=18638 +LAST_EPOCH=18651 diff --git a/zsh/.p10k.zsh b/zsh/.p10k.zsh index 233704a..23235f4 100644 --- a/zsh/.p10k.zsh +++ b/zsh/.p10k.zsh @@ -1,8 +1,8 @@ -# Generated by Powerlevel10k configuration wizard on 2021-01-17 at 18:13 CET. -# Based on romkatv/powerlevel10k/config/p10k-classic.zsh, checksum 52768. +# Generated by Powerlevel10k configuration wizard on 2021-01-27 at 18:04 CET. +# Based on romkatv/powerlevel10k/config/p10k-classic.zsh, checksum 05135. # Wizard options: nerdfont-complete + powerline, small icons, classic, unicode, darkest, -# 24h time, angled separators, slanted heads, slanted tails, 2 lines, solid, no frame, -# sparse, many icons, concise, transient_prompt, instant_prompt=verbose. +# 24h time, angled separators, slanted heads, slanted tails, 2 lines, disconnected, +# no frame, sparse, many icons, concise, transient_prompt, instant_prompt=verbose. # Type `p10k configure` to generate another config. # # Config for Powerlevel10k with classic powerline prompt style. Type `p10k configure` to generate @@ -73,6 +73,7 @@ jenv # java version from jenv (https://github.com/jenv/jenv) plenv # perl version from plenv (https://github.com/tokuhirom/plenv) phpenv # php version from phpenv (https://github.com/phpenv/phpenv) + scalaenv # scala version from scalaenv (https://github.com/scalaenv/scalaenv) haskell_stack # haskell version from stack (https://haskellstack.org/) kubecontext # current kubernetes context (https://kubernetes.io/) terraform # terraform workspace (https://www.terraform.io) @@ -144,7 +145,7 @@ # '─'. The last two make it easier to see the alignment between left and right prompt and to # separate prompt from command output. You might want to set POWERLEVEL9K_PROMPT_ADD_NEWLINE=false # for more compact prompt if using using this option. - typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR='─' + typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR=' ' typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_BACKGROUND= typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_GAP_BACKGROUND= if [[ $POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR != ' ' ]]; then @@ -280,12 +281,12 @@ # the full directory that was used in previous commands. typeset -g POWERLEVEL9K_DIR_HYPERLINK=false - # Enable special styling for non-writable directories. See POWERLEVEL9K_LOCK_ICON and - # POWERLEVEL9K_DIR_CLASSES below. - typeset -g POWERLEVEL9K_DIR_SHOW_WRITABLE=v2 + # Enable special styling for non-writable and non-existent directories. See POWERLEVEL9K_LOCK_ICON + # and POWERLEVEL9K_DIR_CLASSES below. + typeset -g POWERLEVEL9K_DIR_SHOW_WRITABLE=v3 - # The default icon shown next to non-writable directories when POWERLEVEL9K_DIR_SHOW_WRITABLE is - # set to v2. + # The default icon shown next to non-writable and non-existent directories when + # POWERLEVEL9K_DIR_SHOW_WRITABLE is set to v3. # typeset -g POWERLEVEL9K_LOCK_ICON='⭐' # POWERLEVEL9K_DIR_CLASSES allows you to specify custom icons and colors for different @@ -298,8 +299,8 @@ # # Triplets are tried in order. The first triplet whose pattern matches $PWD wins. # - # If POWERLEVEL9K_DIR_SHOW_WRITABLE is set to v2 and the current directory is not writable, - # its class gets suffix _NOT_WRITABLE. + # If POWERLEVEL9K_DIR_SHOW_WRITABLE is set to v3, non-writable and non-existent directories + # acquire class suffix _NOT_WRITABLE and NON_EXISTENT respectively. # # For example, given these settings: # @@ -308,10 +309,11 @@ # '~(|/*)' HOME '' # '*' DEFAULT '') # - # Whenever the current directory is ~/work or a subdirectory of ~/work, it gets styled with class - # WORK or WORK_NOT_WRITABLE. + # Whenever the current directory is ~/work or a subdirectory of ~/work, it gets styled with one + # of the following classes depending on its writability and existence: WORK, WORK_NOT_WRITABLE or + # WORK_NON_EXISTENT. # - # Simply assigning classes to directories don't have any visible effects. It merely gives you an + # Simply assigning classes to directories doesn't have any visible effects. It merely gives you an # option to define custom colors and icons for different directory classes. # # # Styling for WORK. @@ -326,6 +328,12 @@ # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_SHORTENED_FOREGROUND=103 # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_ANCHOR_FOREGROUND=39 # + # # Styling for WORK_NON_EXISTENT. + # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_FOREGROUND=31 + # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_SHORTENED_FOREGROUND=103 + # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_ANCHOR_FOREGROUND=39 + # # If a styling parameter isn't explicitly defined for some class, it falls back to the classless # parameter. For example, if POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_FOREGROUND is not set, it falls # back to POWERLEVEL9K_DIR_FOREGROUND. @@ -378,29 +386,37 @@ fi local res - local where # branch or tag + if [[ -n $VCS_STATUS_LOCAL_BRANCH ]]; then - res+="${clean}${(g::)POWERLEVEL9K_VCS_BRANCH_ICON}" - where=${(V)VCS_STATUS_LOCAL_BRANCH} - elif [[ -n $VCS_STATUS_TAG ]]; then - res+="${meta}#" - where=${(V)VCS_STATUS_TAG} + local branch=${(V)VCS_STATUS_LOCAL_BRANCH} + # If local branch name is at most 32 characters long, show it in full. + # Otherwise show the first 12 … the last 12. + # Tip: To always show local branch name in full without truncation, delete the next line. + (( $#branch > 32 )) && branch[13,-13]="…" # <-- this line + res+="${clean}${(g::)POWERLEVEL9K_VCS_BRANCH_ICON}${branch//\%/%%}" fi - # If local branch name or tag is at most 32 characters long, show it in full. - # Otherwise show the first 12 … the last 12. - # Tip: To always show local branch name in full without truncation, delete the next line. - (( $#where > 32 )) && where[13,-13]="…" + if [[ -n $VCS_STATUS_TAG + # Show tag only if not on a branch. + # Tip: To always show tag, delete the next line. + && -z $VCS_STATUS_LOCAL_BRANCH # <-- this line + ]]; then + local tag=${(V)VCS_STATUS_TAG} + # If tag name is at most 32 characters long, show it in full. + # Otherwise show the first 12 … the last 12. + # Tip: To always show tag name in full without truncation, delete the next line. + (( $#tag > 32 )) && tag[13,-13]="…" # <-- this line + res+="${meta}#${clean}${tag//\%/%%}" + fi - res+="${clean}${where//\%/%%}" # escape % - - # Display the current Git commit if there is no branch or tag. - # Tip: To always display the current Git commit, remove `[[ -z $where ]] &&` from the next line. - [[ -z $where ]] && res+="${meta}@${clean}${VCS_STATUS_COMMIT[1,8]}" + # Display the current Git commit if there is no branch and no tag. + # Tip: To always display the current Git commit, delete the next line. + [[ -z $VCS_STATUS_LOCAL_BRANCH && -z $VCS_STATUS_LOCAL_BRANCH ]] && # <-- this line + res+="${meta}@${clean}${VCS_STATUS_COMMIT[1,8]}" # Show tracking branch name if it differs from local branch. if [[ -n ${VCS_STATUS_REMOTE_BRANCH:#$VCS_STATUS_LOCAL_BRANCH} ]]; then - res+="${meta}:${clean}${(V)VCS_STATUS_REMOTE_BRANCH//\%/%%}" # escape % + res+="${meta}:${clean}${(V)VCS_STATUS_REMOTE_BRANCH//\%/%%}" fi # ⇣42 if behind the remote. @@ -591,7 +607,7 @@ typeset -g POWERLEVEL9K_ASDF_SHOW_SYSTEM=true # If set to non-empty value, hide tools unless there is a file matching the specified file pattern - # in the current directory, or its parent diretory, or its grandparent directory, and so on. + # in the current directory, or its parent directory, or its grandparent directory, and so on. # # Note: If this parameter is set to empty value, it won't hide tools. # Note: SHOW_ON_UPGLOB isn't specific to asdf. It works with all prompt segments. @@ -819,7 +835,7 @@ ##############[ taskwarrior: taskwarrior task count (https://taskwarrior.org/) ]############## # Taskwarrior color. typeset -g POWERLEVEL9K_TASKWARRIOR_FOREGROUND=74 - + # Taskwarrior segment format. The following parameters are available within the expansion. # # - P9K_TASKWARRIOR_PENDING_COUNT The number of pending tasks: `task +PENDING count`. @@ -865,7 +881,8 @@ typeset -g POWERLEVEL9K_VIRTUALENV_FOREGROUND=37 # Don't show Python version next to the virtual environment name. typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION=false - # Don't show virtualenv if pyenv is already shown. + # If set to "false", won't show virtualenv if pyenv is already shown. + # If set to "if-different", won't show virtualenv if it's the same as pyenv. typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_WITH_PYENV=false # Separate environment name from Python version only with a space. typeset -g POWERLEVEL9K_VIRTUALENV_{LEFT,RIGHT}_DELIMITER= @@ -1122,6 +1139,19 @@ # Custom icon. # typeset -g POWERLEVEL9K_PHPENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + #######[ scalaenv: scala version from scalaenv (https://github.com/scalaenv/scalaenv) ]####### + # Scala color. + typeset -g POWERLEVEL9K_SCALAENV_FOREGROUND=160 + # Hide scala version if it doesn't come from one of these sources. + typeset -g POWERLEVEL9K_SCALAENV_SOURCES=(shell local global) + # If set to false, hide scala version if it's the same as global: + # $(scalaenv version-name) == $(scalaenv global). + typeset -g POWERLEVEL9K_SCALAENV_PROMPT_ALWAYS_SHOW=false + # If set to false, hide scala version if it's equal to "system". + typeset -g POWERLEVEL9K_SCALAENV_SHOW_SYSTEM=true + # Custom icon. + # typeset -g POWERLEVEL9K_SCALAENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + ##########[ haskell_stack: haskell version from stack (https://haskellstack.org/) ]########### # Haskell color. typeset -g POWERLEVEL9K_HASKELL_STACK_FOREGROUND=172 @@ -1325,7 +1355,7 @@ # P9K_GCLOUD_PROJECT_ID | gcloud config get-value project # P9K_GCLOUD_PROJECT_NAME | gcloud projects describe $P9K_GCLOUD_PROJECT_ID --format='value(name)' # - # Note: ${VARIABLE//\%/%%} expands to ${VARIABLE} with all occurences of '%' replaced with '%%'. + # Note: ${VARIABLE//\%/%%} expands to ${VARIABLE} with all occurrences of '%' replaced with '%%'. # # Obtaining project name requires sending a request to Google servers. This can take a long time # and even fail. When project name is unknown, P9K_GCLOUD_PROJECT_NAME is not set and gcloud @@ -1398,7 +1428,7 @@ # P9K_GOOGLE_APP_CRED_PROJECT_ID | project_id # P9K_GOOGLE_APP_CRED_CLIENT_EMAIL | client_email # - # Note: ${VARIABLE//\%/%%} expands to ${VARIABLE} with all occurences of '%' replaced by '%%'. + # Note: ${VARIABLE//\%/%%} expands to ${VARIABLE} with all occurrences of '%' replaced by '%%'. typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_CONTENT_EXPANSION='${P9K_GOOGLE_APP_CRED_PROJECT_ID//\%/%%}' ###############################[ public_ip: public IP address ]############################### @@ -1415,7 +1445,7 @@ typeset -g POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION= # Regular expression for the VPN network interface. Run `ifconfig` or `ip -4 a show` while on VPN # to see the name of the interface. - typeset -g POWERLEVEL9K_VPN_IP_INTERFACE='(gpd|wg|(.*tun))[0-9]*' + typeset -g POWERLEVEL9K_VPN_IP_INTERFACE='(gpd|wg|(.*tun)|tailscale)[0-9]*' # If set to true, show one segment per matching network interface. If set to false, show only # one segment corresponding to the first matching network interface. # Tip: If you set it to true, you'll probably want to unset POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION. @@ -1439,7 +1469,7 @@ typeset -g POWERLEVEL9K_IP_CONTENT_EXPANSION='${P9K_IP_RX_RATE:+%70F⇣$P9K_IP_RX_RATE }${P9K_IP_TX_RATE:+%215F⇡$P9K_IP_TX_RATE }%38F$P9K_IP_IP' # Show information for the first network interface whose name matches this regular expression. # Run `ifconfig` or `ip -4 a show` to see the names of all network interfaces. - typeset -g POWERLEVEL9K_IP_INTERFACE='e.*' + typeset -g POWERLEVEL9K_IP_INTERFACE='[ew].*' # Custom icon. # typeset -g POWERLEVEL9K_IP_VISUAL_IDENTIFIER_EXPANSION='⭐' @@ -1482,15 +1512,11 @@ # Parameter | Meaning # ----------------------+--------------- # P9K_WIFI_SSID | service set identifier, a.k.a. network name - # P9K_WIFI_LINK_AUTH | authentication protocol such as "wpa2-psk" or "none" + # P9K_WIFI_LINK_AUTH | authentication protocol such as "wpa2-psk" or "none"; empty if unknown # P9K_WIFI_LAST_TX_RATE | wireless transmit rate in megabits per second # P9K_WIFI_RSSI | signal strength in dBm, from -120 to 0 # P9K_WIFI_NOISE | noise in dBm, from -120 to 0 # P9K_WIFI_BARS | signal strength in bars, from 0 to 4 (derived from P9K_WIFI_RSSI and P9K_WIFI_NOISE) - # - # All parameters except P9K_WIFI_BARS are extracted from the output of the following command: - # - # /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I ####################################[ time: current time ]#################################### # Current time color. diff --git a/zsh/.zshrc b/zsh/.zshrc index 93d6895..ae08f1f 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -2,10 +2,23 @@ # Initialization code that may require console input (password prompts, [y/n] # confirmations, etc.) must go above this block; everything else may go below. #if [ "$TMUX" = "" ]; then tmux; fi + + +# If user ID is greater than or equal to 1000 & if ~/bin exists and is a directory & if ~/bin is not already in your $PATH +# then export ~/bin to your $PATH. +if [[ $UID -ge 1000 && -d $HOME/.local/bin && -z $(echo $PATH | grep -o $HOME/.local/bin) ]] +then + export PATH="${PATH}:$HOME/.local/bin" +fi + if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then startx fi + +pfetch + + if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" fi @@ -45,3 +58,6 @@ alias sc="maim -s ~/Pictures/$(date +%s).png" [ -f ~/.config/lf/icons ] && source ~/.config/lf/icons #eval $(thefuck --alias) + +# To customize prompt, run `p10k configure` or edit ~/dotfiles/zsh/.p10k.zsh. +[[ ! -f ~/dotfiles/zsh/.p10k.zsh ]] || source ~/dotfiles/zsh/.p10k.zsh