diff --git a/.Xresources b/.Xresources old mode 100755 new mode 100644 index e945379..3612e5d --- a/.Xresources +++ b/.Xresources @@ -1,40 +1,34 @@ -Xcursor.size: 20 - -! special -*.foreground: #effbff -*.background: #282c34 -*.cursorColor: #effbff +*background: #1E1E2E +*foreground: #CDD6F4 ! black -*.color0: #000000 -*.color8: #222222 +*color0: #45475A +*color8: #585B70 ! red -*.color1: #ffa3a3 -*.color9: #ff6360 +*color1: #F38BA8 +*color9: #F38BA8 ! green -*.color2: #89e19e -*.color10: #77ff60 +*color2: #A6E3A1 +*color10: #A6E3A1 ! yellow -*.color3: #fbdf90 -*.color11: #f1de7f +*color3: #F9E2AF +*color11: #F9E2AF ! blue -*.color4: #7733ee -*.color12: #7733ee +*color4: #89B4FA +*color12: #89B4FA ! magenta -*.color5: #9054ff -*.color13: #9054ff +*color5: #F5C2E7 +*color13: #F5C2E7 ! cyan -*.color6: #6b90ff -*.color14: #6b90ff +*color6: #94E2D5 +*color14: #94E2D5 ! white -*.color7: #effbff -*.color15: #effbff - -*.color17: #6600cc +*color7: #BAC2DE +*color15: #A6ADC8 diff --git a/.config/dunst/dunstrc b/.config/dunst/dunstrc index 9f4e3b9..cc48229 100755 --- a/.config/dunst/dunstrc +++ b/.config/dunst/dunstrc @@ -24,7 +24,7 @@ # dynamic width from 0 to 300 # width = (0, 300) # constant width of 300 - width = (0, 800) + width = (0, 500) # The maximum height of a single notification, excluding the frame. height = 800 @@ -195,7 +195,7 @@ max_icon_size = 64 # Paths to default icons. - icon_path = /usr/share/icons/breeze-dark/status/16/:/usr/share/icons/breeze/devices/16/ + icon_path = /usr/share/icons/breeze-dark/status/16/:/usr/share/icons/breeze-dark/devices/16/:/usr/share/icons/breeze-dark/actions/16/ ### History ### diff --git a/.config/dunst/dunstrc.b b/.config/dunst/dunstrc.b deleted file mode 100755 index a0e6ce5..0000000 --- a/.config/dunst/dunstrc.b +++ /dev/null @@ -1,414 +0,0 @@ -[global] - ### Display ### - - # Which monitor should the notifications be displayed on. - monitor = 0 - - # Display notification on focused monitor. Possible modes are: - # mouse: follow mouse pointer - # keyboard: follow window with keyboard focus - # none: don't follow anything - # - # "keyboard" needs a window manager that exports the - # _NET_ACTIVE_WINDOW property. - # This should be the case for almost all modern window managers. - # - # If this option is set to mouse or keyboard, the monitor option - # will be ignored. - follow = mouse - - # The geometry of the window: - # [{width}]x{height}[+/-{x}+/-{y}] - # The geometry of the message window. - # The height is measured in number of notifications everything else - # in pixels. If the width is omitted but the height is given - # ("-geometry x2"), the message window expands over the whole screen - # (dmenu-like). If width is 0, the window expands to the longest - # message displayed. A positive x is measured from the left, a - # negative from the right side of the screen. Y is measured from - # the top and down respectively. - # The width can be negative. In this case the actual width is the - # screen width minus the width defined in within the geometry option. - geometry = "700x30-30+40" - - # Show how many messages are currently hidden (because of geometry). - indicate_hidden = yes - - # Shrink window if it's smaller than the width. Will be ignored if - # width is 0. - shrink = no - - # The transparency of the window. Range: [0; 100]. - # This option will only work if a compositing window manager is - # present (e.g. xcompmgr, compiz, etc.). - transparency = 15 - - # The height of the entire notification. If the height is smaller - # than the font height and padding combined, it will be raised - # to the font height and padding. - notification_height = 0 - - # Draw a line of "separator_height" pixel height between two - # notifications. - # Set to 0 to disable. - separator_height = 2 - - # Padding between text and separator. - padding = 8 - - # Horizontal padding. - horizontal_padding = 8 - - # Defines width in pixels of frame around the notification window. - # Set to 0 to disable. - frame_width = 1 - - # Defines color of the frame around the notification window. - frame_color = "#41008c" - - # Define a color for the separator. - # possible values are: - # * auto: dunst tries to find a color fitting to the background; - # * foreground: use the same color as the foreground; - # * frame: use the same color as the frame; - # * anything else will be interpreted as a X color. - separator_color = frame - - # Sort messages by urgency. - sort = yes - - # Don't remove messages, if the user is idle (no mouse or keyboard input) - # for longer than idle_threshold seconds. - # Set to 0 to disable. - # A client can set the 'transient' hint to bypass this. See the rules - # section for how to disable this if necessary - idle_threshold = 120 - - ### Text ### - - font = monospace 13 - - # The spacing between lines. If the height is smaller than the - # font height, it will get raised to the font height. - line_height = 0 - - # Possible values are: - # full: Allow a small subset of html markup in notifications: - # bold - # italic - # strikethrough - # underline - # - # For a complete reference see - # . - # - # strip: This setting is provided for compatibility with some broken - # clients that send markup even though it's not enabled on the - # server. Dunst will try to strip the markup but the parsing is - # simplistic so using this option outside of matching rules for - # specific applications *IS GREATLY DISCOURAGED*. - # - # no: Disable markup parsing, incoming notifications will be treated as - # plain text. Dunst will not advertise that it has the body-markup - # capability if this is set as a global setting. - # - # It's important to note that markup inside the format option will be parsed - # regardless of what this is set to. - markup = full - - # The format of the message. Possible variables are: - # %a appname - # %s summary - # %b body - # %i iconname (including its path) - # %I iconname (without its path) - # %p progress value if set ([ 0%] to [100%]) or nothing - # %n progress value if set without any extra characters - # %% Literal % - # Markup is allowed - format = "%s\n%b" - - # Alignment of message text. - # Possible values are "left", "center" and "right". - alignment = left - - # Show age of message if message is older than show_age_threshold - # seconds. - # Set to -1 to disable. - show_age_threshold = 60 - - # Split notifications into multiple lines if they don't fit into - # geometry. - word_wrap = yes - - # When word_wrap is set to no, specify where to make an ellipsis in long lines. - # Possible values are "start", "middle" and "end". - ellipsize = middle - - # Ignore newlines '\n' in notifications. - ignore_newline = no - - # Stack together notifications with the same content - stack_duplicates = true - - # Hide the count of stacked notifications with the same content - hide_duplicate_count = false - - # Display indicators for URLs (U) and actions (A). - show_indicators = yes - - ### Icons ### - - # Align icons left/right/off - icon_position = left - - # Scale larger icons down to this size, set to 0 to disable - max_icon_size = 32 - - # Paths to default icons. - icon_path = /usr/share/icons/Arc/status/32:/usr/share/icons/Arc/devices/32 - - ### History ### - - # Should a notification popped up from history be sticky or timeout - # as if it would normally do. - sticky_history = yes - - # Maximum amount of notifications kept in history - history_length = 20 - - ### Misc/Advanced ### - - # dmenu path. - dmenu = /usr/bin/dmenu -p dunst: - - # Browser for opening urls in context menu. - browser = /usr/bin/firefox -new-tab - - # Always run rule-defined scripts, even if the notification is suppressed - always_run_script = true - - # Define the title of the windows spawned by dunst - title = Dunst - - # Define the class of the windows spawned by dunst - class = Dunst - - # Print a notification on startup. - # This is mainly for error detection, since dbus (re-)starts dunst - # automatically after a crash. - startup_notification = false - - # Manage dunst's desire for talking - # Can be one of the following values: - # crit: Critical features. Dunst aborts - # warn: Only non-fatal warnings - # mesg: Important Messages - # info: all unimportant stuff - # debug: all less than unimportant stuff - verbosity = mesg - - # Define the corner radius of the notification window - # in pixel size. If the radius is 0, you have no rounded - # corners. - # The radius will be automatically lowered if it exceeds half of the - # notification height to avoid clipping text and/or icons. - corner_radius = 0 - - ### Legacy - - # Use the Xinerama extension instead of RandR for multi-monitor support. - # This setting is provided for compatibility with older nVidia drivers that - # do not support RandR and using it on systems that support RandR is highly - # discouraged. - # - # By enabling this setting dunst will not be able to detect when a monitor - # is connected or disconnected which might break follow mode if the screen - # layout changes. - force_xinerama = false - - ### mouse - - # Defines action of mouse event - # Possible values are: - # * none: Don't do anything. - # * do_action: If the notification has exactly one action, or one is marked as default, - # invoke it. If there are multiple and no default, open the context menu. - # * close_current: Close current notification. - # * close_all: Close all notifications. - mouse_left_click = close_current - mouse_middle_click = do_action - mouse_right_click = close_all - -# Experimental features that may or may not work correctly. Do not expect them -# to have a consistent behaviour across releases. -[experimental] - # Calculate the dpi to use on a per-monitor basis. - # If this setting is enabled the Xft.dpi value will be ignored and instead - # dunst will attempt to calculate an appropriate dpi value for each monitor - # using the resolution and physical size. This might be useful in setups - # where there are multiple screens with very different dpi values. - per_monitor_dpi = false - -[shortcuts] - - # Shortcuts are specified as [modifier+][modifier+]...key - # Available modifiers are "ctrl", "mod1" (the alt-key), "mod2", - # "mod3" and "mod4" (windows-key). - # Xev might be helpful to find names for keys. - - # Close notification. - close = ctrl+space - - # Close all notifications. - close_all = ctrl+shift+space - - # Redisplay last message(s). - # On the US keyboard layout "grave" is normally above TAB and left - # of "1". Make sure this key actually exists on your keyboard layout, - # e.g. check output of 'xmodmap -pke' - history = ctrl+grave - - # Context menu. - context = ctrl+shift+period - -[urgency_low] - # IMPORTANT: colors have to be defined in quotation marks. - # Otherwise the "#" and following would be interpreted as a comment. - background = "#222222" - foreground = "#888888" - timeout = 10 - # Icon for notifications with low urgency, uncomment to enable - #icon = /path/to/icon - -[urgency_normal] - background = "#41008c" - foreground = "#ffffff" - timeout = 10 - # Icon for notifications with normal urgency, uncomment to enable - #icon = /path/to/icon - -[urgency_critical] - background = "#900000" - foreground = "#ffffff" - frame_color = "#ff0000" - timeout = 0 - # Icon for notifications with critical urgency, uncomment to enable - #icon = /path/to/icon - -# Every section that isn't one of the above is interpreted as a rules to -# override settings for certain messages. -# -# Messages can be matched by -# appname (discouraged, see desktop_entry) -# body -# category -# desktop_entry -# icon -# match_transient -# msg_urgency -# stack_tag -# summary -# -# and you can override the -# background -# foreground -# format -# frame_color -# fullscreen -# new_icon -# set_stack_tag -# set_transient -# timeout -# urgency -# -# Shell-like globbing will get expanded. -# -# Instead of the appname filter, it's recommended to use the desktop_entry filter. -# GLib based applications export their desktop-entry name. In comparison to the appname, -# the desktop-entry won't get localized. -# -# SCRIPTING -# You can specify a script that gets run when the rule matches by -# setting the "script" option. -# The script will be called as follows: -# script appname summary body icon urgency -# where urgency can be "LOW", "NORMAL" or "CRITICAL". -# -# NOTE: if you don't want a notification to be displayed, set the format -# to "". -# NOTE: It might be helpful to run dunst -print in a terminal in order -# to find fitting options for rules. - -# Disable the transient hint so that idle_threshold cannot be bypassed from the -# client -#[transient_disable] -# match_transient = yes -# set_transient = no -# -# Make the handling of transient notifications more strict by making them not -# be placed in history. -#[transient_history_ignore] -# match_transient = yes -# history_ignore = yes - -# fullscreen values -# show: show the notifications, regardless if there is a fullscreen window opened -# delay: displays the new notification, if there is no fullscreen window active -# If the notification is already drawn, it won't get undrawn. -# pushback: same as delay, but when switching into fullscreen, the notification will get -# withdrawn from screen again and will get delayed like a new notification -#[fullscreen_delay_everything] -# fullscreen = delay -#[fullscreen_show_critical] -# msg_urgency = critical -# fullscreen = show - -#[espeak] -# summary = "*" -# script = dunst_espeak.sh - -#[script-test] -# summary = "*script*" -# script = dunst_test.sh - -#[ignore] -# # This notification will not be displayed -# summary = "foobar" -# format = "" - -#[history-ignore] -# # This notification will not be saved in history -# summary = "foobar" -# history_ignore = yes - -#[skip-display] -# # This notification will not be displayed, but will be included in the history -# summary = "foobar" -# skip_display = yes - -#[signed_on] -# appname = Pidgin -# summary = "*signed on*" -# urgency = low -# -#[signed_off] -# appname = Pidgin -# summary = *signed off* -# urgency = low -# -#[says] -# appname = Pidgin -# summary = *says* -# urgency = critical -# -#[twitter] -# appname = Pidgin -# summary = *twitter.com* -# urgency = normal -# -#[stack-volumes] -# appname = "some_volume_notifiers" -# set_stack_tag = "volume" -# -# vim: ft=cfg diff --git a/.config/nvim/coc-settings.json b/.config/nvim/coc-settings.json deleted file mode 100644 index a79c9f2..0000000 --- a/.config/nvim/coc-settings.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "languageserver": { - "ccls": { - "command": "ccls", - "args": ["--log-file=/tmp/ccls.log", "-v=1"], - "filetypes": ["c", "cc", "cpp", "c++", "objc", "objcpp"], - "rootPatterns": [".ccls", "compile_commands.json", ".git/", ".hg/"], - "initializationOptions": { - "cache": { - "directory": "/tmp/ccls" - }, - "index": { - "onChange": true - }, - "highlight": { - "lsRanges": true - } - } - } - } -} \ No newline at end of file diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua new file mode 100644 index 0000000..bde8e55 --- /dev/null +++ b/.config/nvim/init.lua @@ -0,0 +1,5 @@ +require('rin.settings') +require('rin.plugins') +require('rin.keymaps') +require('rin.lsp') +-- TODO: treesitter, telescope, NERDtree alt diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim deleted file mode 100755 index fbca16b..0000000 --- a/.config/nvim/init.vim +++ /dev/null @@ -1,363 +0,0 @@ -call plug#begin('~/.vim/plugged') - - Plug 'joshdick/onedark.vim' " Colors - Plug 'itchyny/lightline.vim' " Lightline statusbar - Plug 'scrooloose/nerdtree' " Nerdtree - Plug 'tiagofumo/vim-nerdtree-syntax-highlight' " Highlighting Nerdtree - Plug 'ryanoasis/vim-devicons' " Icons for Nerdtree - Plug 'ap/vim-css-color' " Color previews for CSS - Plug 'junegunn/limelight.vim' - Plug 'junegunn/fzf.vim' - Plug 'xolox/vim-misc' - Plug 'xolox/vim-session' - Plug 'neoclide/coc.nvim', {'branch': 'release'} - Plug 'mfussenegger/nvim-dap' - Plug 'rcarriga/nvim-dap-ui' - Plug 'jackguo380/vim-lsp-cxx-highlight' - Plug 'vim-syntastic/syntastic' - Plug 'rhysd/vim-clang-format' - Plug 'lambdalisue/suda.vim' -call plug#end() - -" for transparent background -function! AdaptColorscheme() - highlight clear CursorLine - highlight Normal ctermbg=none - highlight LineNr ctermbg=none - highlight Folded ctermbg=none - highlight NonText ctermbg=none - highlight SpecialKey ctermbg=none - highlight VertSplit ctermbg=none - highlight SignColumn ctermbg=none -endfunction - -autocmd ColorScheme * call AdaptColorscheme() - - -set cursorline - -" colorscheme -syntax on - -" brackets -inoremap " "" -inoremap ' '' -inoremap ( () -inoremap [ [] -inoremap { {} -inoremap { {}O -inoremap {; {};O - -filetype plugin on -let g:instant_markdown_browser = "firefox --new-window" - -let g:session_autosave = "no" -let g:session_autoload = "no" - -" Make Vim more useful -set nocompatible -" Long lines as one line -set nowrap -" Ruler -set ruler -" Horizontal splits will automatically be below -set splitbelow -" Vertical splits will automatically be to the right -set splitright -" Indent -set smartindent -set autoindent -" Use the OS clipboard by default (on versions compiled with `+clipboard`) -set clipboard+=unnamedplus -" Enhance command-line completion -set wildmenu -" Disables automatic commenting on newline: -autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o -" Allow cursor keys in insert mode -" Allow backspace in insert mode -set backspace=indent,eol,start -" Optimize for fast terminal connections -set ttyfast -" Add the g flag to search/replace by default -set gdefault -" Use UTF-8 without BOM -set encoding=utf-8 -" Change mapleader -let mapleader="," -" Don’t add empty newlines at the end of files -set binary -set noeol -set smartcase -set noswapfile -set nobackup -set undodir=~/.vim/undodir -set undofile - -" 256 colors -set t_Co=256 -" Respect modeline in files -set modeline -set modelines=4 -" Enable per-directory .vimrc files and disable unsafe commands in them -set exrc -set secure -" Enable line numbers -set number -" Make tabs as wide as two spaces -set tabstop=4 -set shiftwidth=4 -set smarttab -set expandtab -" Highlight searches -set hlsearch -" Ignore case of searches -set ignorecase -" Highlight dynamically as pattern is typed -set incsearch -" Always show status line -set laststatus=2 -" Enable mouse in all modes -set mouse=a -" Disable error bells -set noerrorbells -" Don’t reset cursor to start of line when moving around. -set nostartofline -" Show the cursor position -set ruler -" Don’t show the intro message when starting Vim -set shortmess=atI -" Show the current mode -set showmode -" Show the filename in the window titlebar -set title -" Show the (partial) command as it’s being typed -set showcmd -" Use relative line numbers - -set hidden -set nobackup -set nowritebackup -set updatetime=300 -set shortmess+=c - -" Give more space for displaying messages. -set cmdheight=2 -set pumheight=5 - -" Always show the signcolumn, otherwise it would shift the text each time -" diagnostics appear/become resolved. -if has("nvim-0.5.0") || has("patch-8.1.1564") - " Recently vim can merge signcolumn and number column into one - set signcolumn=number -else - set signcolumn=yes -endif - -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 - -" Use to trigger completion. -if has('nvim') - inoremap coc#refresh() -else - inoremap coc#refresh() -endif - -" Make auto-select the first completion item and notify coc.nvim to -" format on enter, could be remapped by other vim plugin -inoremap pumvisible() ? coc#_select_confirm() - \: "\u\\=coc#on_enter()\" - -" Use `[g` and `]g` to navigate diagnostics -" Use `:CocDiagnostics` to get all diagnostics of current buffer in location list. -nmap [g (coc-diagnostic-prev) -nmap ]g (coc-diagnostic-next) - -" GoTo code navigation. -nmap gd (coc-definition) -nmap gy (coc-type-definition) -nmap gi (coc-implementation) -nmap gr (coc-references) - -" Use K to show documentation in preview window. -nnoremap K :call show_documentation() - -function! s:show_documentation() - if (index(['vim','help'], &filetype) >= 0) - execute 'h '.expand('') - elseif (coc#rpc#ready()) - call CocActionAsync('doHover') - else - execute '!' . &keywordprg . " " . expand('') - endif -endfunction - -" Highlight the symbol and its references when holding the cursor. -autocmd CursorHold * silent call CocActionAsync('highlight') - -" Symbol renaming. -nmap rn (coc-rename) - -" Formatting selected code. -xmap f (coc-format-selected) -nmap f (coc-format-selected) - -augroup mygroup - autocmd! - " Setup formatexpr specified filetype(s). - autocmd FileType typescript,json setl formatexpr=CocAction('formatSelected') - " Update signature help on jump placeholder. - autocmd User CocJumpPlaceholder call CocActionAsync('showSignatureHelp') -augroup end - -" Applying codeAction to the selected region. -" Example: `aap` for current paragraph -xmap a (coc-codeaction-selected) -nmap a (coc-codeaction-selected) - -" Remap keys for applying codeAction to the current buffer. -nmap ac (coc-codeaction) -" Apply AutoFix to problem on the current line. -nmap qf (coc-fix-current) - -" Run the Code Lens action on the current line. -nmap cl (coc-codelens-action) - -" Remap and for scroll float windows/popups. -if has('nvim-0.4.0') || has('patch-8.2.0750') - nnoremap coc#float#has_scroll() ? coc#float#scroll(1) : "\" - nnoremap coc#float#has_scroll() ? coc#float#scroll(0) : "\" - inoremap coc#float#has_scroll() ? "\=coc#float#scroll(1)\" : "\" - inoremap coc#float#has_scroll() ? "\=coc#float#scroll(0)\" : "\" - vnoremap coc#float#has_scroll() ? coc#float#scroll(1) : "\" - vnoremap coc#float#has_scroll() ? coc#float#scroll(0) : "\" -endif - - -" Add `:Format` command to format current buffer. -command! -nargs=0 Format :call CocActionAsync('format') - -" Add `:Fold` command to fold current buffer. -command! -nargs=? Fold :call CocAction('fold', ) - -" Add `:OR` command for organize imports of the current buffer. -command! -nargs=0 OR :call CocActionAsync('runCommand', 'editor.action.organizeImport') - -let g:lightline = { - \ 'colorscheme': 'onedark', - \ 'active': { - \ 'left': [ [ 'mode', 'paste' ], - \ [ 'cocstatus', 'readonly', 'filename', 'modified' ] ] - \ }, - \ 'component_function': { - \ 'cocstatus': 'coc#status' - \ }, - \ } - -" Use autocmd to force lightline update. -autocmd User CocStatusChange,CocDiagnosticChange call lightline#update() - -" Mappings for CoCList -" Show all diagnostics. -nnoremap a :CocList diagnostics -" Manage extensions. -nnoremap e :CocList extensions -" Show commands. -nnoremap c :CocList commands -" Find symbol of current document. -nnoremap o :CocList outline -" Search workspace symbols. -nnoremap s :CocList -I symbols -" Do default action for next item. -nnoremap j :CocNext -" Do default action for previous item. -nnoremap k :CocPrev -" Resume latest coc list. -nnoremap p :CocListResume - -" c++ syntax highlighting -let g:cpp_class_scope_highlight = 1 -let g:cpp_member_variable_highlight = 1 -let g:cpp_class_decl_highlight = 1 - -" c++ linting -let g:syntastic_cpp_checkers = ['cpplint'] -let g:syntastic_c_checkers = ['cpplint'] -let g:syntastic_cpp_cpplint_exec = 'cpplint' -" The following two lines are optional. Configure it to your liking! -let g:syntastic_check_on_open = 1 -let g:syntastic_check_on_wq = 0 - -nnoremap f :ClangFormat - -" header guards -function! s:insert_gates() - let gatename = substitute(toupper(expand("%:t")), "\\.", "_", "g") - execute "normal! i#ifndef " . gatename - execute "normal! o#define " . gatename . " " - execute "normal! Go#endif /* " . gatename . " */" - normal! ko -endfunction -autocmd BufNewFile *.{h,hpp} call insert_gates() - -if exists("&relativenumber") - set relativenumber - au BufReadPost * set relativenumber -endif " Start scrolling three lines before the horizontal window border -set scrolloff=3 - -" Toggle spellchecking -function! ToggleSpellCheck() - set spell! - if &spell - echo "Spellcheck ON" - else - echo "Spellcheck OFF" - endif -endfunction - - -" Better tabbing -vnoremap < >gv - -" Better window navigation -nnoremap h -nnoremap j -nnoremap k -nnoremap l - -map c :w! \| !make -map r v l :terminal ./run.sh % a -map t :!st& -map o :FZF -map s :call ToggleSpellCheck() -map n :NERDTreeToggle -map Q gq -" Insert mode completion -imap (fzf-complete-word) -imap (fzf-complete-path) -imap (fzf-complete-line) -vnoremap "+y - -" Write as root -cnoremap w!! SudaWrite - -colorscheme onedark - -" Debugging -map db :lua require'dap'.toggle_breakpoint() -map dc :lua require'dap'.continue() -map do :lua require'dap'.step_over() -map di :lua require'dap'.step_into() -map dn :lua require("dapui").toggle() -lua require("dap-conf") -lua require("dapui").setup() diff --git a/.config/nvim/lua/dap-conf.lua b/.config/nvim/lua/dap-conf.lua deleted file mode 100644 index 7908492..0000000 --- a/.config/nvim/lua/dap-conf.lua +++ /dev/null @@ -1,32 +0,0 @@ -local dap = require('dap') - -dap.adapters.cppdbg = { - id = 'cppdbg', - type = 'executable', - command = '/home/rinri/.config/nvim/cpptools/extension/debugAdapters/bin/OpenDebugAD7', -} - -dap.configurations.cpp = { - { - name = "Launch file", - type = "cppdbg", - request = "launch", - program = function() - return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file') - end, - cwd = '${workspaceFolder}', - stopOnEntry = true, - }, - { - name = 'Attach to gdbserver :1234', - type = 'cppdbg', - request = 'launch', - MIMode = 'gdb', - miDebuggerServerAddress = 'localhost:1234', - miDebuggerPath = '/usr/bin/gdb', - cwd = '${workspaceFolder}', - program = function() - return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file') - end, - }, -} \ No newline at end of file diff --git a/.config/nvim/lua/rin/keymaps.lua b/.config/nvim/lua/rin/keymaps.lua new file mode 100644 index 0000000..8668b0d --- /dev/null +++ b/.config/nvim/lua/rin/keymaps.lua @@ -0,0 +1,34 @@ +local function map(kind, lhs, rhs, opts) + vim.api.nvim_set_keymap(kind, lhs, rhs, opts) +end + +local sn = {noremap = true, silent = true} + +-- Brackets +map('i', '\"', '\"\"', sn) +map('i', '\'', '\'\'', sn) +map('i', '(', '()', sn) +map('i', '[', '[]', sn) +map('i', '{', '{}', sn) +map('i', '{', '{}O', sn) +map('i', '{;', '{};O', sn) + +-- Spell check toggle +map('n', '', ':set spell!', sn) +map('i', '', ':set spell!', sn) + +-- Identation +map('v', '<', '', '>gv', sn) + +-- Split navigation +map('n', '', 'h', sn) +map('n', '', 'j', sn) +map('n', '', 'k', sn) +map('n', '', 'l', sn) + +-- Run Make +map('n', 'c', ':w! | !make ', sn) +map('n', 'n', ':NERDTreeToggle', sn) + +map('n', 'l', ':Limelight!! 0.5 ', sn) diff --git a/.config/nvim/lua/rin/lsp/init.lua b/.config/nvim/lua/rin/lsp/init.lua new file mode 100644 index 0000000..cf7768f --- /dev/null +++ b/.config/nvim/lua/rin/lsp/init.lua @@ -0,0 +1,120 @@ +-- TODO: show function signature help on hover +-- web, vimtex + +-- Mappings. +-- See `:help vim.diagnostic.*` for documentation on any of the below functions +local opts = { noremap = true, silent = true } +vim.keymap.set('n', 'e', vim.diagnostic.open_float, opts) +vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, opts) +vim.keymap.set('n', ']d', vim.diagnostic.goto_next, opts) +vim.keymap.set('n', 'q', vim.diagnostic.setloclist, opts) + +-- Use an on_attach function to only map the following keys +-- after the language server attaches to the current buffer +local on_attach = function(client, bufnr) + -- Enable completion triggered by + vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc') + + -- Mappings. + -- See `:help vim.lsp.*` for documentation on any of the below functions + local bufopts = { noremap = true, silent = true, buffer = bufnr } + vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, bufopts) + vim.keymap.set('n', 'gd', vim.lsp.buf.definition, bufopts) + vim.keymap.set('n', 'K', vim.lsp.buf.hover, bufopts) + vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, bufopts) + vim.keymap.set('n', '', vim.lsp.buf.signature_help, bufopts) + vim.keymap.set('n', 'wa', vim.lsp.buf.add_workspace_folder, bufopts) + vim.keymap.set('n', 'wr', vim.lsp.buf.remove_workspace_folder, bufopts) + vim.keymap.set('n', 'wl', function() + print(vim.inspect(vim.lsp.buf.list_workspace_folders())) + end, bufopts) + vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, bufopts) + vim.keymap.set('n', 'rn', vim.lsp.buf.rename, bufopts) + vim.keymap.set('n', 'ca', vim.lsp.buf.code_action, bufopts) + vim.keymap.set('n', 'gr', vim.lsp.buf.references, bufopts) + vim.keymap.set('n', 'f', vim.lsp.buf.formatting, bufopts) +end + +local lsp_flags = { + -- This is the default in Nvim 0.7+ + debounce_text_changes = 150, +} + +local servers = { 'tsserver', 'rust_analyzer', 'clangd', 'sumneko_lua' } +local lspconfig = require('lspconfig') + +lspconfig['sumneko_lua'].setup { + on_attach = on_attach, + flags = lsp_flags, + settings = { + Lua = { + runtime = { + -- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim) + version = 'LuaJIT', + }, + diagnostics = { + -- Get the language server to recognize the `vim` global + globals = { 'vim' }, + }, + workspace = { + -- Make the server aware of Neovim runtime files + library = vim.api.nvim_get_runtime_file("", true), + }, + -- Do not send telemetry data containing a randomized but unique identifier + telemetry = { + enable = false, + }, + }, + }, +} + +local capabilities = vim.lsp.protocol.make_client_capabilities() +capabilities = require('cmp_nvim_lsp').update_capabilities(capabilities) +for _, lsp in ipairs(servers) do + lspconfig[lsp].setup { + on_attach = on_attach, + flags = lsp_flags, + capabilities = capabilities, + } +end + +local luasnip = require 'luasnip' +local cmp = require 'cmp' +cmp.setup { + snippet = { + expand = function(args) + luasnip.lsp_expand(args.body) + end, + }, + mapping = cmp.mapping.preset.insert({ + [''] = cmp.mapping.scroll_docs(-4), + [''] = cmp.mapping.scroll_docs(4), + [''] = cmp.mapping.complete(), + [''] = cmp.mapping.confirm { + behavior = cmp.ConfirmBehavior.Replace, + select = true, + }, + [''] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_next_item() + elseif luasnip.expand_or_jumpable() then + luasnip.expand_or_jump() + else + fallback() + end + end, { 'i', 's' }), + [''] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_prev_item() + elseif luasnip.jumpable(-1) then + luasnip.jump(-1) + else + fallback() + end + end, { 'i', 's' }), + }), + sources = { + { name = 'nvim_lsp' }, + { name = 'luasnip' }, + }, +} diff --git a/.config/nvim/lua/rin/plugins.lua b/.config/nvim/lua/rin/plugins.lua new file mode 100644 index 0000000..b28dc29 --- /dev/null +++ b/.config/nvim/lua/rin/plugins.lua @@ -0,0 +1,31 @@ +-- Automatically run :PackerCompile whenever plugins.lua is updated with an autocommand: +vim.api.nvim_create_autocmd('BufWritePost', { + group = vim.api.nvim_create_augroup('PACKER', { clear = true }), + pattern = 'plugins.lua', + command = 'source | PackerCompile', +}) + +require('mason').setup() + +return require('packer').startup(function(use) + use 'wbthomason/packer.nvim' + use 'glepnir/dashboard-nvim' + use 'joshdick/onedark.vim' + use 'itchyny/lightline.vim' + use 'scrooloose/nerdtree' + use 'tiagofumo/vim-nerdtree-syntax-highlight' + use 'ryanoasis/vim-devicons' + use 'ap/vim-css-color' + use 'vim-syntastic/syntastic' + use 'rhysd/vim-clang-format' + use 'lambdalisue/suda.vim' + use 'neovim/nvim-lspconfig' + use 'jackguo380/vim-lsp-cxx-highlight' + use 'williamboman/mason.nvim' + use 'hrsh7th/nvim-cmp' -- Autocompletion plugin + use 'hrsh7th/cmp-nvim-lsp' -- LSP source for nvim-cmp + use 'saadparwaiz1/cmp_luasnip' -- Snippets source for nvim-cmp + use 'L3MON4D3/LuaSnip' -- Snippets plugin + -- TODO: add telescope and other useful plugins +end) + diff --git a/.config/nvim/lua/rin/settings.lua b/.config/nvim/lua/rin/settings.lua new file mode 100644 index 0000000..429dfd0 --- /dev/null +++ b/.config/nvim/lua/rin/settings.lua @@ -0,0 +1,81 @@ +local g = vim.g +local o = vim.o +local api = vim.api +local opt = vim.opt +local cmd = vim.cmd +local home = os.getenv('HOME') + +-- Decrease update time +o.timeoutlen = 500 +o.updatetime = 200 + +-- Number of screen lines to keep above and below the cursor +o.scrolloff = 8 + +o.number = true +o.relativenumber = true +o.signcolumn = 'yes:1' + +o.expandtab = true +-- o.smarttab = true +o.cindent = true +-- o.autoindent = true + +o.wrap = false +o.textwidth = 300 +o.tabstop = 4 +o.shiftwidth = 0 +o.softtabstop = -1 -- If negative, shiftwidth value is used +o.list = true +o.listchars = 'trail:·,nbsp:◇,tab:→ ,extends:▸,precedes:◂' + +-- OS clipboard +o.clipboard = 'unnamedplus' + +-- Mouse in all modes +opt.mouse = 'a' + +-- Case insensitive searching UNLESS /C or capital in search +o.ignorecase = true +o.smartcase = true + +o.backup = false +o.writebackup = false +o.undofile = true +o.undodir = home .. '/.vim/undodir' +o.swapfile = false + +o.splitright = true +o.splitbelow = true + +g.lightline = {colorscheme = 'onedark'} + +g.mapleader = ' ' +g.maplocalleader = ' ' + +o.termguicolors = true + +api.nvim_create_autocmd('ColorScheme', { + command = [[ + highlight clear CursorLine + highlight Normal ctermbg=none + highlight Normal guibg=none + highlight LineNr ctermbg=none + highlight LineNr guibg=none + highlight Folded ctermbg=none + highlight Folded guibg=none + highlight NonText ctermbg=none + highlight NonText guibg=none + highlight SpecialKey ctermbg=none + highlight SpecialKey guibg=none + highlight VertSplit ctermbg=none + highlight VertSplit guibg=none + highlight SignColumn ctermbg=none + highlight SignColumn guibg=none + ]] +}) +cmd('colorscheme onedark') + +-- BUG: this won't update the search count after pressing `n` or `N` +-- When running macros and regexes on a large file, lazy redraw tells neovim/vim not to draw the screen +-- o.lazyredraw = true diff --git a/.config/nvim/plugin/packer_compiled.lua b/.config/nvim/plugin/packer_compiled.lua new file mode 100644 index 0000000..d3637b2 --- /dev/null +++ b/.config/nvim/plugin/packer_compiled.lua @@ -0,0 +1,184 @@ +-- Automatically generated packer.nvim plugin loader code + +if vim.api.nvim_call_function('has', {'nvim-0.5'}) ~= 1 then + vim.api.nvim_command('echohl WarningMsg | echom "Invalid Neovim version for packer.nvim! | echohl None"') + return +end + +vim.api.nvim_command('packadd packer.nvim') + +local no_errors, error_msg = pcall(function() + +_G._packer = _G._packer or {} +_G._packer.inside_compile = true + +local time +local profile_info +local should_profile = false +if should_profile then + local hrtime = vim.loop.hrtime + profile_info = {} + time = function(chunk, start) + if start then + profile_info[chunk] = hrtime() + else + profile_info[chunk] = (hrtime() - profile_info[chunk]) / 1e6 + end + end +else + time = function(chunk, start) end +end + +local function save_profiles(threshold) + local sorted_times = {} + for chunk_name, time_taken in pairs(profile_info) do + sorted_times[#sorted_times + 1] = {chunk_name, time_taken} + end + table.sort(sorted_times, function(a, b) return a[2] > b[2] end) + local results = {} + for i, elem in ipairs(sorted_times) do + if not threshold or threshold and elem[2] > threshold then + results[i] = elem[1] .. ' took ' .. elem[2] .. 'ms' + end + end + if threshold then + table.insert(results, '(Only showing plugins that took longer than ' .. threshold .. ' ms ' .. 'to load)') + end + + _G._packer.profile_output = results +end + +time([[Luarocks path setup]], true) +local package_path_str = "/home/rinri/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?.lua;/home/rinri/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?/init.lua;/home/rinri/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?.lua;/home/rinri/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?/init.lua" +local install_cpath_pattern = "/home/rinri/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/lua/5.1/?.so" +if not string.find(package.path, package_path_str, 1, true) then + package.path = package.path .. ';' .. package_path_str +end + +if not string.find(package.cpath, install_cpath_pattern, 1, true) then + package.cpath = package.cpath .. ';' .. install_cpath_pattern +end + +time([[Luarocks path setup]], false) +time([[try_loadstring definition]], true) +local function try_loadstring(s, component, name) + local success, result = pcall(loadstring(s), name, _G.packer_plugins[name]) + if not success then + vim.schedule(function() + vim.api.nvim_notify('packer.nvim: Error running ' .. component .. ' for ' .. name .. ': ' .. result, vim.log.levels.ERROR, {}) + end) + end + return result +end + +time([[try_loadstring definition]], false) +time([[Defining packer_plugins]], true) +_G.packer_plugins = { + LuaSnip = { + loaded = true, + path = "/home/rinri/.local/share/nvim/site/pack/packer/start/LuaSnip", + url = "https://github.com/L3MON4D3/LuaSnip" + }, + ["cmp-nvim-lsp"] = { + loaded = true, + path = "/home/rinri/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp", + url = "https://github.com/hrsh7th/cmp-nvim-lsp" + }, + cmp_luasnip = { + loaded = true, + path = "/home/rinri/.local/share/nvim/site/pack/packer/start/cmp_luasnip", + url = "https://github.com/saadparwaiz1/cmp_luasnip" + }, + ["dashboard-nvim"] = { + loaded = true, + path = "/home/rinri/.local/share/nvim/site/pack/packer/start/dashboard-nvim", + url = "https://github.com/glepnir/dashboard-nvim" + }, + ["lightline.vim"] = { + loaded = true, + path = "/home/rinri/.local/share/nvim/site/pack/packer/start/lightline.vim", + url = "https://github.com/itchyny/lightline.vim" + }, + ["mason.nvim"] = { + loaded = true, + path = "/home/rinri/.local/share/nvim/site/pack/packer/start/mason.nvim", + url = "https://github.com/williamboman/mason.nvim" + }, + nerdtree = { + loaded = true, + path = "/home/rinri/.local/share/nvim/site/pack/packer/start/nerdtree", + url = "https://github.com/scrooloose/nerdtree" + }, + ["nvim-cmp"] = { + loaded = true, + path = "/home/rinri/.local/share/nvim/site/pack/packer/start/nvim-cmp", + url = "https://github.com/hrsh7th/nvim-cmp" + }, + ["nvim-lspconfig"] = { + loaded = true, + path = "/home/rinri/.local/share/nvim/site/pack/packer/start/nvim-lspconfig", + url = "https://github.com/neovim/nvim-lspconfig" + }, + ["onedark.vim"] = { + loaded = true, + path = "/home/rinri/.local/share/nvim/site/pack/packer/start/onedark.vim", + url = "https://github.com/joshdick/onedark.vim" + }, + ["packer.nvim"] = { + loaded = true, + path = "/home/rinri/.local/share/nvim/site/pack/packer/start/packer.nvim", + url = "https://github.com/wbthomason/packer.nvim" + }, + ["suda.vim"] = { + loaded = true, + path = "/home/rinri/.local/share/nvim/site/pack/packer/start/suda.vim", + url = "https://github.com/lambdalisue/suda.vim" + }, + syntastic = { + loaded = true, + path = "/home/rinri/.local/share/nvim/site/pack/packer/start/syntastic", + url = "https://github.com/vim-syntastic/syntastic" + }, + ["vim-clang-format"] = { + loaded = true, + path = "/home/rinri/.local/share/nvim/site/pack/packer/start/vim-clang-format", + url = "https://github.com/rhysd/vim-clang-format" + }, + ["vim-css-color"] = { + loaded = true, + path = "/home/rinri/.local/share/nvim/site/pack/packer/start/vim-css-color", + url = "https://github.com/ap/vim-css-color" + }, + ["vim-devicons"] = { + loaded = true, + path = "/home/rinri/.local/share/nvim/site/pack/packer/start/vim-devicons", + url = "https://github.com/ryanoasis/vim-devicons" + }, + ["vim-lsp-cxx-highlight"] = { + loaded = true, + path = "/home/rinri/.local/share/nvim/site/pack/packer/start/vim-lsp-cxx-highlight", + url = "https://github.com/jackguo380/vim-lsp-cxx-highlight" + }, + ["vim-nerdtree-syntax-highlight"] = { + loaded = true, + path = "/home/rinri/.local/share/nvim/site/pack/packer/start/vim-nerdtree-syntax-highlight", + url = "https://github.com/tiagofumo/vim-nerdtree-syntax-highlight" + } +} + +time([[Defining packer_plugins]], false) + +_G._packer.inside_compile = false +if _G._packer.needs_bufread == true then + vim.cmd("doautocmd BufRead") +end +_G._packer.needs_bufread = false + +if should_profile then save_profiles() end + +end) + +if not no_errors then + error_msg = error_msg:gsub('"', '\\"') + vim.api.nvim_command('echohl ErrorMsg | echom "Error in packer_compiled: '..error_msg..'" | echom "Please check your config for correctness" | echohl None') +end diff --git a/.config/picom/picom.conf b/.config/picom/picom.conf index fcdbd4b..f7354f0 100644 --- a/.config/picom/picom.conf +++ b/.config/picom/picom.conf @@ -9,24 +9,26 @@ opacity-rule = [ "90:class_g = 'URxvt'", "90:class_g = 'Alacritty'", "95:class_g = 'St' && focused", - "80:class_g = 'St' && !focused", + "87:class_g = 'St' && !focused", + "95:class_g = 'cmus' && focused", + "87:class_g = 'cmus' && !focused", + "95:class_g = 'cpsrc' && focused", + "87:class_g = 'cpsrc' && !focused", "90:class_g = 'tabbed'", "95:class_g = 'Emacs'", ]; # Blur -blur-background = true; -blur-method = "dual_kawase"; -blur-strength = 3; +#blur-method = "dual_kawase"; +blur-strength = 2; blur-background-exclude = [ "class_g = 'Dunst'" ]; # Fading -fading = false; +fading = true; fade-in-step = 0.05; fade-out-step = 0.05; -fade-exclude = [ ]; # Rounded corners corner-radius=20 diff --git a/.p10k.zsh b/.p10k.zsh deleted file mode 100644 index 5e9640b..0000000 --- a/.p10k.zsh +++ /dev/null @@ -1,1646 +0,0 @@ -# Generated by Powerlevel10k configuration wizard on 2021-11-19 at 13:58 MSK. -# Based on romkatv/powerlevel10k/config/p10k-rainbow.zsh, checksum 15764. -# Wizard options: nerdfont-complete + powerline, small icons, rainbow, unicode, -# angled separators, sharp heads, flat tails, 2 lines, disconnected, no frame, compact, -# many icons, concise, transient_prompt, instant_prompt=verbose. -# Type `p10k configure` to generate another config. -# -# Config for Powerlevel10k with powerline prompt style with colorful background. -# Type `p10k configure` to generate your own config based on it. -# -# Tip: Looking for a nice color? Here's a one-liner to print colormap. -# -# for i in {0..255}; do print -Pn "%K{$i} %k%F{$i}${(l:3::0:)i}%f " ${${(M)$((i%6)):#3}:+$'\n'}; done - -# Temporarily change options. -'builtin' 'local' '-a' 'p10k_config_opts' -[[ ! -o 'aliases' ]] || p10k_config_opts+=('aliases') -[[ ! -o 'sh_glob' ]] || p10k_config_opts+=('sh_glob') -[[ ! -o 'no_brace_expand' ]] || p10k_config_opts+=('no_brace_expand') -'builtin' 'setopt' 'no_aliases' 'no_sh_glob' 'brace_expand' - -() { - emulate -L zsh -o extended_glob - - # Unset all configuration options. This allows you to apply configuration changes without - # restarting zsh. Edit ~/.p10k.zsh and type `source ~/.p10k.zsh`. - unset -m '(POWERLEVEL9K_*|DEFAULT_USER)~POWERLEVEL9K_GITSTATUS_DIR' - - # Zsh >= 5.1 is required. - autoload -Uz is-at-least && is-at-least 5.1 || return - - # The list of segments shown on the left. Fill it with the most important segments. - typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=( - # =========================[ Line #1 ]========================= - dir # current directory - vcs # git status - # =========================[ Line #2 ]========================= - newline # \n - prompt_char # prompt symbol - ) - - # The list of segments shown on the right. Fill it with less important segments. - # Right prompt on the last prompt line (where you are typing your commands) gets - # automatically hidden when the input line reaches it. Right prompt above the - # last prompt line gets hidden if it would overlap with left prompt. - typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=( - # =========================[ Line #1 ]========================= - status # exit code of the last command - command_execution_time # duration of the last command - background_jobs # presence of background jobs - direnv # direnv status (https://direnv.net/) - asdf # asdf version manager (https://github.com/asdf-vm/asdf) - virtualenv # python virtual environment (https://docs.python.org/3/library/venv.html) - anaconda # conda environment (https://conda.io/) - pyenv # python environment (https://github.com/pyenv/pyenv) - goenv # go environment (https://github.com/syndbg/goenv) - nodenv # node.js version from nodenv (https://github.com/nodenv/nodenv) - nvm # node.js version from nvm (https://github.com/nvm-sh/nvm) - nodeenv # node.js environment (https://github.com/ekalinin/nodeenv) - # node_version # node.js version - # go_version # go version (https://golang.org) - # rust_version # rustc version (https://www.rust-lang.org) - # dotnet_version # .NET version (https://dotnet.microsoft.com) - # php_version # php version (https://www.php.net/) - # laravel_version # laravel php framework version (https://laravel.com/) - # java_version # java version (https://www.java.com/) - # package # name@version from package.json (https://docs.npmjs.com/files/package.json) - rbenv # ruby version from rbenv (https://github.com/rbenv/rbenv) - rvm # ruby version from rvm (https://rvm.io) - fvm # flutter version management (https://github.com/leoafarias/fvm) - luaenv # lua version from luaenv (https://github.com/cehoffman/luaenv) - 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) - haskell_stack # haskell version from stack (https://haskellstack.org/) - kubecontext # current kubernetes context (https://kubernetes.io/) - terraform # terraform workspace (https://www.terraform.io) - aws # aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) - aws_eb_env # aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/) - azure # azure account name (https://docs.microsoft.com/en-us/cli/azure) - gcloud # google cloud cli account and project (https://cloud.google.com/) - google_app_cred # google application credentials (https://cloud.google.com/docs/authentication/production) - context # user@hostname - nordvpn # nordvpn connection status, linux only (https://nordvpn.com/) - ranger # ranger shell (https://github.com/ranger/ranger) - nnn # nnn shell (https://github.com/jarun/nnn) - vim_shell # vim shell indicator (:sh) - midnight_commander # midnight commander shell (https://midnight-commander.org/) - nix_shell # nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html) - # vi_mode # vi mode (you don't need this if you've enabled prompt_char) - # vpn_ip # virtual private network indicator - # load # CPU load - # disk_usage # disk usage - # ram # free RAM - # swap # used swap - todo # todo items (https://github.com/todotxt/todo.txt-cli) - timewarrior # timewarrior tracking status (https://timewarrior.net/) - taskwarrior # taskwarrior task count (https://taskwarrior.org/) - # time # current time - # =========================[ Line #2 ]========================= - newline - # ip # ip address and bandwidth usage for a specified network interface - # public_ip # public IP address - # proxy # system-wide http/https/ftp proxy - # battery # internal battery - # wifi # wifi speed - # example # example user-defined segment (see prompt_example function below) - ) - - # Defines character set used by powerlevel10k. It's best to let `p10k configure` set it for you. - typeset -g POWERLEVEL9K_MODE=nerdfont-complete - # When set to `moderate`, some icons will have an extra space after them. This is meant to avoid - # icon overlap when using non-monospace fonts. When set to `none`, spaces are not added. - typeset -g POWERLEVEL9K_ICON_PADDING=none - - # When set to true, icons appear before content on both sides of the prompt. When set - # to false, icons go after content. If empty or not set, icons go before content in the left - # prompt and after content in the right prompt. - # - # You can also override it for a specific segment: - # - # POWERLEVEL9K_STATUS_ICON_BEFORE_CONTENT=false - # - # Or for a specific segment in specific state: - # - # POWERLEVEL9K_DIR_NOT_WRITABLE_ICON_BEFORE_CONTENT=false - typeset -g POWERLEVEL9K_ICON_BEFORE_CONTENT= - - # Add an empty line before each prompt. - typeset -g POWERLEVEL9K_PROMPT_ADD_NEWLINE=false - - # Connect left prompt lines with these symbols. You'll probably want to use the same color - # as POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_FOREGROUND below. - typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX= - typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_PREFIX= - typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX= - # Connect right prompt lines with these symbols. - typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_SUFFIX= - typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_SUFFIX= - typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_SUFFIX= - - # Filler between left and right prompt on the first prompt line. You can set it to ' ', '·' or - # '─'. 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_BACKGROUND= - typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_GAP_BACKGROUND= - if [[ $POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR != ' ' ]]; then - # The color of the filler. You'll probably want to match the color of POWERLEVEL9K_MULTILINE - # ornaments defined above. - typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_FOREGROUND=242 - # Start filler from the edge of the screen if there are no left segments on the first line. - typeset -g POWERLEVEL9K_EMPTY_LINE_LEFT_PROMPT_FIRST_SEGMENT_END_SYMBOL='%{%}' - # End filler on the edge of the screen if there are no right segments on the first line. - typeset -g POWERLEVEL9K_EMPTY_LINE_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL='%{%}' - fi - - # Separator between same-color segments on the left. - typeset -g POWERLEVEL9K_LEFT_SUBSEGMENT_SEPARATOR='\uE0B1' - # Separator between same-color segments on the right. - typeset -g POWERLEVEL9K_RIGHT_SUBSEGMENT_SEPARATOR='\uE0B3' - # Separator between different-color segments on the left. - typeset -g POWERLEVEL9K_LEFT_SEGMENT_SEPARATOR='\uE0B0' - # Separator between different-color segments on the right. - typeset -g POWERLEVEL9K_RIGHT_SEGMENT_SEPARATOR='\uE0B2' - # The right end of left prompt. - typeset -g POWERLEVEL9K_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL='\uE0B0' - # The left end of right prompt. - typeset -g POWERLEVEL9K_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL='\uE0B2' - # The left end of left prompt. - typeset -g POWERLEVEL9K_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL='' - # The right end of right prompt. - typeset -g POWERLEVEL9K_RIGHT_PROMPT_LAST_SEGMENT_END_SYMBOL='' - # Left prompt terminator for lines without any segments. - typeset -g POWERLEVEL9K_EMPTY_LINE_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL= - - #################################[ os_icon: os identifier ]################################## - # OS identifier color. - typeset -g POWERLEVEL9K_OS_ICON_FOREGROUND=232 - typeset -g POWERLEVEL9K_OS_ICON_BACKGROUND=7 - # Custom icon. - # typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION='⭐' - - ################################[ prompt_char: prompt symbol ]################################ - # Transparent background. - typeset -g POWERLEVEL9K_PROMPT_CHAR_BACKGROUND= - # Green prompt symbol if the last command succeeded. - typeset -g POWERLEVEL9K_PROMPT_CHAR_OK_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=76 - # Red prompt symbol if the last command failed. - typeset -g POWERLEVEL9K_PROMPT_CHAR_ERROR_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=196 - # Default prompt symbol. - typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIINS_CONTENT_EXPANSION='❯' - # Prompt symbol in command vi mode. - typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VICMD_CONTENT_EXPANSION='❮' - # Prompt symbol in visual vi mode. - typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIVIS_CONTENT_EXPANSION='V' - # Prompt symbol in overwrite vi mode. - typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIOWR_CONTENT_EXPANSION='▶' - typeset -g POWERLEVEL9K_PROMPT_CHAR_OVERWRITE_STATE=true - # No line terminator if prompt_char is the last segment. - typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL= - # No line introducer if prompt_char is the first segment. - typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL= - # No surrounding whitespace. - typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_{LEFT,RIGHT}_WHITESPACE= - - ##################################[ dir: current directory ]################################## - # Current directory background color. - typeset -g POWERLEVEL9K_DIR_BACKGROUND=4 - # Default current directory foreground color. - typeset -g POWERLEVEL9K_DIR_FOREGROUND=254 - # If directory is too long, shorten some of its segments to the shortest possible unique - # prefix. The shortened directory can be tab-completed to the original. - typeset -g POWERLEVEL9K_SHORTEN_STRATEGY=truncate_to_unique - # Replace removed segment suffixes with this symbol. - typeset -g POWERLEVEL9K_SHORTEN_DELIMITER= - # Color of the shortened directory segments. - typeset -g POWERLEVEL9K_DIR_SHORTENED_FOREGROUND=250 - # Color of the anchor directory segments. Anchor segments are never shortened. The first - # segment is always an anchor. - typeset -g POWERLEVEL9K_DIR_ANCHOR_FOREGROUND=255 - # Display anchor directory segments in bold. - typeset -g POWERLEVEL9K_DIR_ANCHOR_BOLD=true - # Don't shorten directories that contain any of these files. They are anchors. - local anchor_files=( - .bzr - .citc - .git - .hg - .node-version - .python-version - .go-version - .ruby-version - .lua-version - .java-version - .perl-version - .php-version - .tool-version - .shorten_folder_marker - .svn - .terraform - CVS - Cargo.toml - composer.json - go.mod - package.json - stack.yaml - ) - typeset -g POWERLEVEL9K_SHORTEN_FOLDER_MARKER="(${(j:|:)anchor_files})" - # If set to "first" ("last"), remove everything before the first (last) subdirectory that contains - # files matching $POWERLEVEL9K_SHORTEN_FOLDER_MARKER. For example, when the current directory is - # /foo/bar/git_repo/nested_git_repo/baz, prompt will display git_repo/nested_git_repo/baz (first) - # or nested_git_repo/baz (last). This assumes that git_repo and nested_git_repo contain markers - # and other directories don't. - typeset -g POWERLEVEL9K_DIR_TRUNCATE_BEFORE_MARKER=false - # Don't shorten this many last directory segments. They are anchors. - typeset -g POWERLEVEL9K_SHORTEN_DIR_LENGTH=1 - # Shorten directory if it's longer than this even if there is space for it. The value can - # be either absolute (e.g., '80') or a percentage of terminal width (e.g, '50%'). If empty, - # directory will be shortened only when prompt doesn't fit or when other parameters demand it - # (see POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS and POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT below). - # If set to `0`, directory will always be shortened to its minimum length. - typeset -g POWERLEVEL9K_DIR_MAX_LENGTH=80 - # When `dir` segment is on the last prompt line, try to shorten it enough to leave at least this - # many columns for typing commands. - typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS=40 - # When `dir` segment is on the last prompt line, try to shorten it enough to leave at least - # COLUMNS * POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT * 0.01 columns for typing commands. - typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT=50 - # If set to true, embed a hyperlink into the directory. Useful for quickly - # opening a directory in the file manager simply by clicking the link. - # Can also be handy when the directory is shortened, as it allows you to see - # 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 - - # The default icon shown next to non-writable directories when POWERLEVEL9K_DIR_SHOW_WRITABLE is - # set to v2. - # typeset -g POWERLEVEL9K_LOCK_ICON='⭐' - - # POWERLEVEL9K_DIR_CLASSES allows you to specify custom icons and colors for different - # directories. It must be an array with 3 * N elements. Each triplet consists of: - # - # 1. A pattern against which the current directory ($PWD) is matched. Matching is done with - # extended_glob option enabled. - # 2. Directory class for the purpose of styling. - # 3. An empty string. - # - # 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. - # - # For example, given these settings: - # - # typeset -g POWERLEVEL9K_DIR_CLASSES=( - # '~/work(|/*)' WORK '' - # '~(|/*)' HOME '' - # '*' DEFAULT '') - # - # Whenever the current directory is ~/work or a subdirectory of ~/work, it gets styled with class - # WORK or WORK_NOT_WRITABLE. - # - # Simply assigning classes to directories don't have any visible effects. It merely gives you an - # option to define custom colors and icons for different directory classes. - # - # # Styling for WORK. - # typeset -g POWERLEVEL9K_DIR_WORK_VISUAL_IDENTIFIER_EXPANSION='⭐' - # typeset -g POWERLEVEL9K_DIR_WORK_BACKGROUND=4 - # typeset -g POWERLEVEL9K_DIR_WORK_FOREGROUND=254 - # typeset -g POWERLEVEL9K_DIR_WORK_SHORTENED_FOREGROUND=250 - # typeset -g POWERLEVEL9K_DIR_WORK_ANCHOR_FOREGROUND=255 - # - # # Styling for WORK_NOT_WRITABLE. - # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_VISUAL_IDENTIFIER_EXPANSION='⭐' - # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_BACKGROUND=4 - # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_FOREGROUND=254 - # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_SHORTENED_FOREGROUND=250 - # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_ANCHOR_FOREGROUND=255 - # - # 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. - # - # typeset -g POWERLEVEL9K_DIR_CLASSES=() - - # Custom prefix. - # typeset -g POWERLEVEL9K_DIR_PREFIX='in ' - - #####################################[ vcs: git status ]###################################### - # Version control system colors. - # typeset -g POWERLEVEL9K_VCS_CLEAN_BACKGROUND=2 - # typeset -g POWERLEVEL9K_VCS_MODIFIED_BACKGROUND=3 - # typeset -g POWERLEVEL9K_VCS_UNTRACKED_BACKGROUND=2 - # typeset -g POWERLEVEL9K_VCS_CONFLICTED_BACKGROUND=3 - # typeset -g POWERLEVEL9K_VCS_LOADING_BACKGROUND=8 - - # Branch icon. Set this parameter to '\uF126 ' for the popular Powerline branch icon. - typeset -g POWERLEVEL9K_VCS_BRANCH_ICON='\uF126 ' - - # Untracked files icon. It's really a question mark, your font isn't broken. - # Change the value of this parameter to show a different icon. - typeset -g POWERLEVEL9K_VCS_UNTRACKED_ICON='?' - - # Formatter for Git status. - # - # Example output: master ⇣42⇡42 *42 merge ~42 +42 !42 ?42. - # - # You can edit the function to customize how Git status looks. - # - # VCS_STATUS_* parameters are set by gitstatus plugin. See reference: - # https://github.com/romkatv/gitstatus/blob/master/gitstatus.plugin.zsh. - function my_git_formatter() { - emulate -L zsh - - if [[ -n $P9K_CONTENT ]]; then - # If P9K_CONTENT is not empty, use it. It's either "loading" or from vcs_info (not from - # gitstatus plugin). VCS_STATUS_* parameters are not available in this case. - typeset -g my_git_format=$P9K_CONTENT - return - fi - - # Styling for different parts of Git status. - local meta='%7F' # white foreground - local clean='%0F' # black foreground - local modified='%0F' # black foreground - local untracked='%0F' # black foreground - local conflicted='%1F' # red foreground - - 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} - 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]="…" - 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]}" - - # 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 % - fi - - # ⇣42 if behind the remote. - (( VCS_STATUS_COMMITS_BEHIND )) && res+=" ${clean}⇣${VCS_STATUS_COMMITS_BEHIND}" - # ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42. - (( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && res+=" " - (( VCS_STATUS_COMMITS_AHEAD )) && res+="${clean}⇡${VCS_STATUS_COMMITS_AHEAD}" - # ⇠42 if behind the push remote. - (( VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" ${clean}⇠${VCS_STATUS_PUSH_COMMITS_BEHIND}" - (( VCS_STATUS_PUSH_COMMITS_AHEAD && !VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" " - # ⇢42 if ahead of the push remote; no leading space if also behind: ⇠42⇢42. - (( VCS_STATUS_PUSH_COMMITS_AHEAD )) && res+="${clean}⇢${VCS_STATUS_PUSH_COMMITS_AHEAD}" - # *42 if have stashes. - (( VCS_STATUS_STASHES )) && res+=" ${clean}*${VCS_STATUS_STASHES}" - # 'merge' if the repo is in an unusual state. - [[ -n $VCS_STATUS_ACTION ]] && res+=" ${conflicted}${VCS_STATUS_ACTION}" - # ~42 if have merge conflicts. - (( VCS_STATUS_NUM_CONFLICTED )) && res+=" ${conflicted}~${VCS_STATUS_NUM_CONFLICTED}" - # +42 if have staged changes. - (( VCS_STATUS_NUM_STAGED )) && res+=" ${modified}+${VCS_STATUS_NUM_STAGED}" - # !42 if have unstaged changes. - (( VCS_STATUS_NUM_UNSTAGED )) && res+=" ${modified}!${VCS_STATUS_NUM_UNSTAGED}" - # ?42 if have untracked files. It's really a question mark, your font isn't broken. - # See POWERLEVEL9K_VCS_UNTRACKED_ICON above if you want to use a different icon. - # Remove the next line if you don't want to see untracked files at all. - (( VCS_STATUS_NUM_UNTRACKED )) && res+=" ${untracked}${(g::)POWERLEVEL9K_VCS_UNTRACKED_ICON}${VCS_STATUS_NUM_UNTRACKED}" - # "─" if the number of unstaged files is unknown. This can happen due to - # POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY (see below) being set to a non-negative number lower - # than the number of files in the Git index, or due to bash.showDirtyState being set to false - # in the repository config. The number of staged and untracked files may also be unknown - # in this case. - (( VCS_STATUS_HAS_UNSTAGED == -1 )) && res+=" ${modified}─" - - typeset -g my_git_format=$res - } - functions -M my_git_formatter 2>/dev/null - - # Don't count the number of unstaged, untracked and conflicted files in Git repositories with - # more than this many files in the index. Negative value means infinity. - # - # If you are working in Git repositories with tens of millions of files and seeing performance - # sagging, try setting POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY to a number lower than the output - # of `git ls-files | wc -l`. Alternatively, add `bash.showDirtyState = false` to the repository's - # config: `git config bash.showDirtyState false`. - typeset -g POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY=-1 - - # Don't show Git status in prompt for repositories whose workdir matches this pattern. - # For example, if set to '~', the Git repository at $HOME/.git will be ignored. - # Multiple patterns can be combined with '|': '~(|/foo)|/bar/baz/*'. - typeset -g POWERLEVEL9K_VCS_DISABLED_WORKDIR_PATTERN='~' - - # Disable the default Git status formatting. - typeset -g POWERLEVEL9K_VCS_DISABLE_GITSTATUS_FORMATTING=true - # Install our own Git status formatter. - typeset -g POWERLEVEL9K_VCS_CONTENT_EXPANSION='${$((my_git_formatter()))+${my_git_format}}' - # Enable counters for staged, unstaged, etc. - typeset -g POWERLEVEL9K_VCS_{STAGED,UNSTAGED,UNTRACKED,CONFLICTED,COMMITS_AHEAD,COMMITS_BEHIND}_MAX_NUM=-1 - - # Custom icon. - # typeset -g POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_EXPANSION='⭐' - # Custom prefix. - # typeset -g POWERLEVEL9K_VCS_PREFIX='on ' - - # Show status of repositories of these types. You can add svn and/or hg if you are - # using them. If you do, your prompt may become slow even when your current directory - # isn't in an svn or hg reposotiry. - typeset -g POWERLEVEL9K_VCS_BACKENDS=(git) - - ##########################[ status: exit code of the last command ]########################### - # Enable OK_PIPE, ERROR_PIPE and ERROR_SIGNAL status states to allow us to enable, disable and - # style them independently from the regular OK and ERROR state. - typeset -g POWERLEVEL9K_STATUS_EXTENDED_STATES=true - - # Status on success. No content, just an icon. No need to show it if prompt_char is enabled as - # it will signify success by turning green. - typeset -g POWERLEVEL9K_STATUS_OK=false - typeset -g POWERLEVEL9K_STATUS_OK_VISUAL_IDENTIFIER_EXPANSION='✔' - # typeset -g POWERLEVEL9K_STATUS_OK_FOREGROUND=2 - # typeset -g POWERLEVEL9K_STATUS_OK_BACKGROUND=0 - - # Status when some part of a pipe command fails but the overall exit status is zero. It may look - # like this: 1|0. - typeset -g POWERLEVEL9K_STATUS_OK_PIPE=true - typeset -g POWERLEVEL9K_STATUS_OK_PIPE_VISUAL_IDENTIFIER_EXPANSION='✔' - # typeset -g POWERLEVEL9K_STATUS_OK_PIPE_FOREGROUND=2 - # typeset -g POWERLEVEL9K_STATUS_OK_PIPE_BACKGROUND=0 - - # Status when it's just an error code (e.g., '1'). No need to show it if prompt_char is enabled as - # it will signify error by turning red. - typeset -g POWERLEVEL9K_STATUS_ERROR=false - typeset -g POWERLEVEL9K_STATUS_ERROR_VISUAL_IDENTIFIER_EXPANSION='✘' - # typeset -g POWERLEVEL9K_STATUS_ERROR_FOREGROUND=3 - # typeset -g POWERLEVEL9K_STATUS_ERROR_BACKGROUND=1 - - # Status when the last command was terminated by a signal. - typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL=true - # Use terse signal names: "INT" instead of "SIGINT(2)". - typeset -g POWERLEVEL9K_STATUS_VERBOSE_SIGNAME=false - typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_VISUAL_IDENTIFIER_EXPANSION='✘' - # typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_FOREGROUND=3 - # typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_BACKGROUND=1 - - # Status when some part of a pipe command fails and the overall exit status is also non-zero. - # It may look like this: 1|0. - typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE=true - typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_VISUAL_IDENTIFIER_EXPANSION='✘' - # typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_FOREGROUND=3 - # typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_BACKGROUND=1 - - ###################[ command_execution_time: duration of the last command ]################### - # Execution time color. - typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND=0 - typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_BACKGROUND=3 - # Show duration of the last command if takes longer than this many seconds. - typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=3 - # Show this many fractional digits. Zero means round to seconds. - typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION=0 - # Duration format: 1d 2h 3m 4s. - typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FORMAT='d h m s' - # Custom icon. - # typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_VISUAL_IDENTIFIER_EXPANSION='⭐' - # Custom prefix. - # typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PREFIX='took ' - - #######################[ background_jobs: presence of background jobs ]####################### - # Background jobs color. - # typeset -g POWERLEVEL9K_BACKGROUND_JOBS_FOREGROUND=6 - # typeset -g POWERLEVEL9K_BACKGROUND_JOBS_BACKGROUND=0 - # Don't show the number of background jobs. - typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE=false - # Custom icon. - # typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VISUAL_IDENTIFIER_EXPANSION='⭐' - - #######################[ direnv: direnv status (https://direnv.net/) ]######################## - # Direnv color. - # typeset -g POWERLEVEL9K_DIRENV_FOREGROUND=3 - # typeset -g POWERLEVEL9K_DIRENV_BACKGROUND=0 - # Custom icon. - # typeset -g POWERLEVEL9K_DIRENV_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ###############[ asdf: asdf version manager (https://github.com/asdf-vm/asdf) ]############### - # Default asdf color. Only used to display tools for which there is no color override (see below). - # Tip: Override these parameters for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_FOREGROUND and - # POWERLEVEL9K_ASDF_${TOOL}_BACKGROUND. - typeset -g POWERLEVEL9K_ASDF_FOREGROUND=0 - typeset -g POWERLEVEL9K_ASDF_BACKGROUND=7 - - # There are four parameters that can be used to hide asdf tools. Each parameter describes - # conditions under which a tool gets hidden. Parameters can hide tools but not unhide them. If at - # least one parameter decides to hide a tool, that tool gets hidden. If no parameter decides to - # hide a tool, it gets shown. - # - # Special note on the difference between POWERLEVEL9K_ASDF_SOURCES and - # POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW. Consider the effect of the following commands: - # - # asdf local python 3.8.1 - # asdf global python 3.8.1 - # - # After running both commands the current python version is 3.8.1 and its source is "local" as - # it takes precedence over "global". If POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW is set to false, - # it'll hide python version in this case because 3.8.1 is the same as the global version. - # POWERLEVEL9K_ASDF_SOURCES will hide python version only if the value of this parameter doesn't - # contain "local". - - # Hide tool versions that don't come from one of these sources. - # - # Available sources: - # - # - shell `asdf current` says "set by ASDF_${TOOL}_VERSION environment variable" - # - local `asdf current` says "set by /some/not/home/directory/file" - # - global `asdf current` says "set by /home/username/file" - # - # Note: If this parameter is set to (shell local global), it won't hide tools. - # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SOURCES. - typeset -g POWERLEVEL9K_ASDF_SOURCES=(shell local global) - - # If set to false, hide tool versions that are the same as global. - # - # Note: The name of this parameter doesn't reflect its meaning at all. - # Note: If this parameter is set to true, it won't hide tools. - # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_PROMPT_ALWAYS_SHOW. - typeset -g POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW=false - - # If set to false, hide tool versions that are equal to "system". - # - # Note: If this parameter is set to true, it won't hide tools. - # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SHOW_SYSTEM. - 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. - # - # 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. - # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SHOW_ON_UPGLOB. - # - # Example: Hide nodejs version when there is no package.json and no *.js files in the current - # directory, in `..`, in `../..` and so on. - # - # typeset -g POWERLEVEL9K_ASDF_NODEJS_SHOW_ON_UPGLOB='*.js|package.json' - typeset -g POWERLEVEL9K_ASDF_SHOW_ON_UPGLOB= - - # Ruby version from asdf. - typeset -g POWERLEVEL9K_ASDF_RUBY_FOREGROUND=0 - typeset -g POWERLEVEL9K_ASDF_RUBY_BACKGROUND=1 - # typeset -g POWERLEVEL9K_ASDF_RUBY_VISUAL_IDENTIFIER_EXPANSION='⭐' - # typeset -g POWERLEVEL9K_ASDF_RUBY_SHOW_ON_UPGLOB='*.foo|*.bar' - - # Python version from asdf. - typeset -g POWERLEVEL9K_ASDF_PYTHON_FOREGROUND=0 - typeset -g POWERLEVEL9K_ASDF_PYTHON_BACKGROUND=4 - # typeset -g POWERLEVEL9K_ASDF_PYTHON_VISUAL_IDENTIFIER_EXPANSION='⭐' - # typeset -g POWERLEVEL9K_ASDF_PYTHON_SHOW_ON_UPGLOB='*.foo|*.bar' - - # Go version from asdf. - typeset -g POWERLEVEL9K_ASDF_GOLANG_FOREGROUND=0 - typeset -g POWERLEVEL9K_ASDF_GOLANG_BACKGROUND=4 - # typeset -g POWERLEVEL9K_ASDF_GOLANG_VISUAL_IDENTIFIER_EXPANSION='⭐' - # typeset -g POWERLEVEL9K_ASDF_GOLANG_SHOW_ON_UPGLOB='*.foo|*.bar' - - # Node.js version from asdf. - typeset -g POWERLEVEL9K_ASDF_NODEJS_FOREGROUND=0 - typeset -g POWERLEVEL9K_ASDF_NODEJS_BACKGROUND=2 - # typeset -g POWERLEVEL9K_ASDF_NODEJS_VISUAL_IDENTIFIER_EXPANSION='⭐' - # typeset -g POWERLEVEL9K_ASDF_NODEJS_SHOW_ON_UPGLOB='*.foo|*.bar' - - # Rust version from asdf. - typeset -g POWERLEVEL9K_ASDF_RUST_FOREGROUND=0 - typeset -g POWERLEVEL9K_ASDF_RUST_BACKGROUND=208 - # typeset -g POWERLEVEL9K_ASDF_RUST_VISUAL_IDENTIFIER_EXPANSION='⭐' - # typeset -g POWERLEVEL9K_ASDF_RUST_SHOW_ON_UPGLOB='*.foo|*.bar' - - # .NET Core version from asdf. - typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_FOREGROUND=0 - typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_BACKGROUND=5 - # typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_VISUAL_IDENTIFIER_EXPANSION='⭐' - # typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_SHOW_ON_UPGLOB='*.foo|*.bar' - - # Flutter version from asdf. - typeset -g POWERLEVEL9K_ASDF_FLUTTER_FOREGROUND=0 - typeset -g POWERLEVEL9K_ASDF_FLUTTER_BACKGROUND=4 - # typeset -g POWERLEVEL9K_ASDF_FLUTTER_VISUAL_IDENTIFIER_EXPANSION='⭐' - # typeset -g POWERLEVEL9K_ASDF_FLUTTER_SHOW_ON_UPGLOB='*.foo|*.bar' - - # Lua version from asdf. - typeset -g POWERLEVEL9K_ASDF_LUA_FOREGROUND=0 - typeset -g POWERLEVEL9K_ASDF_LUA_BACKGROUND=4 - # typeset -g POWERLEVEL9K_ASDF_LUA_VISUAL_IDENTIFIER_EXPANSION='⭐' - # typeset -g POWERLEVEL9K_ASDF_LUA_SHOW_ON_UPGLOB='*.foo|*.bar' - - # Java version from asdf. - typeset -g POWERLEVEL9K_ASDF_JAVA_FOREGROUND=1 - typeset -g POWERLEVEL9K_ASDF_JAVA_BACKGROUND=7 - # typeset -g POWERLEVEL9K_ASDF_JAVA_VISUAL_IDENTIFIER_EXPANSION='⭐' - # typeset -g POWERLEVEL9K_ASDF_JAVA_SHOW_ON_UPGLOB='*.foo|*.bar' - - # Perl version from asdf. - typeset -g POWERLEVEL9K_ASDF_PERL_FOREGROUND=0 - typeset -g POWERLEVEL9K_ASDF_PERL_BACKGROUND=4 - # typeset -g POWERLEVEL9K_ASDF_PERL_VISUAL_IDENTIFIER_EXPANSION='⭐' - # typeset -g POWERLEVEL9K_ASDF_PERL_SHOW_ON_UPGLOB='*.foo|*.bar' - - # Erlang version from asdf. - typeset -g POWERLEVEL9K_ASDF_ERLANG_FOREGROUND=0 - typeset -g POWERLEVEL9K_ASDF_ERLANG_BACKGROUND=1 - # typeset -g POWERLEVEL9K_ASDF_ERLANG_VISUAL_IDENTIFIER_EXPANSION='⭐' - # typeset -g POWERLEVEL9K_ASDF_ERLANG_SHOW_ON_UPGLOB='*.foo|*.bar' - - # Elixir version from asdf. - typeset -g POWERLEVEL9K_ASDF_ELIXIR_FOREGROUND=0 - typeset -g POWERLEVEL9K_ASDF_ELIXIR_BACKGROUND=5 - # typeset -g POWERLEVEL9K_ASDF_ELIXIR_VISUAL_IDENTIFIER_EXPANSION='⭐' - # typeset -g POWERLEVEL9K_ASDF_ELIXIR_SHOW_ON_UPGLOB='*.foo|*.bar' - - # Postgres version from asdf. - typeset -g POWERLEVEL9K_ASDF_POSTGRES_FOREGROUND=0 - typeset -g POWERLEVEL9K_ASDF_POSTGRES_BACKGROUND=6 - # typeset -g POWERLEVEL9K_ASDF_POSTGRES_VISUAL_IDENTIFIER_EXPANSION='⭐' - # typeset -g POWERLEVEL9K_ASDF_POSTGRES_SHOW_ON_UPGLOB='*.foo|*.bar' - - # PHP version from asdf. - typeset -g POWERLEVEL9K_ASDF_PHP_FOREGROUND=0 - typeset -g POWERLEVEL9K_ASDF_PHP_BACKGROUND=5 - # typeset -g POWERLEVEL9K_ASDF_PHP_VISUAL_IDENTIFIER_EXPANSION='⭐' - # typeset -g POWERLEVEL9K_ASDF_PHP_SHOW_ON_UPGLOB='*.foo|*.bar' - - # Haskell version from asdf. - typeset -g POWERLEVEL9K_ASDF_HASKELL_FOREGROUND=0 - typeset -g POWERLEVEL9K_ASDF_HASKELL_BACKGROUND=3 - # typeset -g POWERLEVEL9K_ASDF_HASKELL_VISUAL_IDENTIFIER_EXPANSION='⭐' - # typeset -g POWERLEVEL9K_ASDF_HASKELL_SHOW_ON_UPGLOB='*.foo|*.bar' - - # Julia version from asdf. - typeset -g POWERLEVEL9K_ASDF_JULIA_FOREGROUND=0 - typeset -g POWERLEVEL9K_ASDF_JULIA_BACKGROUND=2 - # typeset -g POWERLEVEL9K_ASDF_JULIA_VISUAL_IDENTIFIER_EXPANSION='⭐' - # typeset -g POWERLEVEL9K_ASDF_JULIA_SHOW_ON_UPGLOB='*.foo|*.bar' - - ##########[ nordvpn: nordvpn connection status, linux only (https://nordvpn.com/) ]########### - # NordVPN connection indicator color. - # typeset -g POWERLEVEL9K_NORDVPN_FOREGROUND=7 - # typeset -g POWERLEVEL9K_NORDVPN_BACKGROUND=4 - # Hide NordVPN connection indicator when not connected. - typeset -g POWERLEVEL9K_NORDVPN_{DISCONNECTED,CONNECTING,DISCONNECTING}_CONTENT_EXPANSION= - typeset -g POWERLEVEL9K_NORDVPN_{DISCONNECTED,CONNECTING,DISCONNECTING}_VISUAL_IDENTIFIER_EXPANSION= - # Custom icon. - # typeset -g POWERLEVEL9K_NORDVPN_VISUAL_IDENTIFIER_EXPANSION='⭐' - - #################[ ranger: ranger shell (https://github.com/ranger/ranger) ]################## - # Ranger shell color. - # typeset -g POWERLEVEL9K_RANGER_FOREGROUND=3 - # typeset -g POWERLEVEL9K_RANGER_BACKGROUND=0 - # Custom icon. - # typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ######################[ nnn: nnn shell (https://github.com/jarun/nnn) ]####################### - # Nnn shell color. - # typeset -g POWERLEVEL9K_NNN_FOREGROUND=0 - # typeset -g POWERLEVEL9K_NNN_BACKGROUND=6 - # Custom icon. - # typeset -g POWERLEVEL9K_NNN_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ###########################[ vim_shell: vim shell indicator (:sh) ]########################### - # Vim shell indicator color. - # typeset -g POWERLEVEL9K_VIM_SHELL_FOREGROUND=0 - # typeset -g POWERLEVEL9K_VIM_SHELL_BACKGROUND=2 - # Custom icon. - # typeset -g POWERLEVEL9K_VIM_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ######[ midnight_commander: midnight commander shell (https://midnight-commander.org/) ]###### - # Midnight Commander shell color. - # typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_FOREGROUND=3 - # typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_BACKGROUND=0 - # Custom icon. - # typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_VISUAL_IDENTIFIER_EXPANSION='⭐' - - #[ nix_shell: nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html) ]## - # Nix shell color. - # typeset -g POWERLEVEL9K_NIX_SHELL_FOREGROUND=0 - # typeset -g POWERLEVEL9K_NIX_SHELL_BACKGROUND=4 - - # Tip: If you want to see just the icon without "pure" and "impure", uncomment the next line. - # typeset -g POWERLEVEL9K_NIX_SHELL_CONTENT_EXPANSION= - - # Custom icon. - # typeset -g POWERLEVEL9K_NIX_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ##################################[ disk_usage: disk usage ]################################## - # Colors for different levels of disk usage. - # typeset -g POWERLEVEL9K_DISK_USAGE_NORMAL_FOREGROUND=3 - # typeset -g POWERLEVEL9K_DISK_USAGE_NORMAL_BACKGROUND=0 - # typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_FOREGROUND=0 - # typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_BACKGROUND=3 - # typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_FOREGROUND=7 - # typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_BACKGROUND=1 - # Thresholds for different levels of disk usage (percentage points). - typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_LEVEL=90 - typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_LEVEL=95 - # If set to true, hide disk usage when below $POWERLEVEL9K_DISK_USAGE_WARNING_LEVEL percent. - typeset -g POWERLEVEL9K_DISK_USAGE_ONLY_WARNING=false - # Custom icon. - # typeset -g POWERLEVEL9K_DISK_USAGE_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ###########[ vi_mode: vi mode (you don't need this if you've enabled prompt_char) ]########### - # Foreground color. - typeset -g POWERLEVEL9K_VI_MODE_FOREGROUND=0 - # Text and color for normal (a.k.a. command) vi mode. - typeset -g POWERLEVEL9K_VI_COMMAND_MODE_STRING=NORMAL - typeset -g POWERLEVEL9K_VI_MODE_NORMAL_BACKGROUND=2 - # Text and color for visual vi mode. - typeset -g POWERLEVEL9K_VI_VISUAL_MODE_STRING=VISUAL - typeset -g POWERLEVEL9K_VI_MODE_VISUAL_BACKGROUND=4 - # Text and color for overtype (a.k.a. overwrite and replace) vi mode. - typeset -g POWERLEVEL9K_VI_OVERWRITE_MODE_STRING=OVERTYPE - typeset -g POWERLEVEL9K_VI_MODE_OVERWRITE_BACKGROUND=3 - # Text and color for insert vi mode. - typeset -g POWERLEVEL9K_VI_INSERT_MODE_STRING= - typeset -g POWERLEVEL9K_VI_MODE_INSERT_FOREGROUND=8 - - ######################################[ ram: free RAM ]####################################### - # RAM color. - # typeset -g POWERLEVEL9K_RAM_FOREGROUND=0 - # typeset -g POWERLEVEL9K_RAM_BACKGROUND=3 - # Custom icon. - # typeset -g POWERLEVEL9K_RAM_VISUAL_IDENTIFIER_EXPANSION='⭐' - - #####################################[ swap: used swap ]###################################### - # Swap color. - # typeset -g POWERLEVEL9K_SWAP_FOREGROUND=0 - # typeset -g POWERLEVEL9K_SWAP_BACKGROUND=3 - # Custom icon. - # typeset -g POWERLEVEL9K_SWAP_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ######################################[ load: CPU load ]###################################### - # Show average CPU load over this many last minutes. Valid values are 1, 5 and 15. - typeset -g POWERLEVEL9K_LOAD_WHICH=5 - # Load color when load is under 50%. - # typeset -g POWERLEVEL9K_LOAD_NORMAL_FOREGROUND=0 - # typeset -g POWERLEVEL9K_LOAD_NORMAL_BACKGROUND=2 - # Load color when load is between 50% and 70%. - # typeset -g POWERLEVEL9K_LOAD_WARNING_FOREGROUND=0 - # typeset -g POWERLEVEL9K_LOAD_WARNING_BACKGROUND=3 - # Load color when load is over 70%. - # typeset -g POWERLEVEL9K_LOAD_CRITICAL_FOREGROUND=0 - # typeset -g POWERLEVEL9K_LOAD_CRITICAL_BACKGROUND=1 - # Custom icon. - # typeset -g POWERLEVEL9K_LOAD_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ################[ todo: todo items (https://github.com/todotxt/todo.txt-cli) ]################ - # Todo color. - # typeset -g POWERLEVEL9K_TODO_FOREGROUND=0 - # typeset -g POWERLEVEL9K_TODO_BACKGROUND=8 - # Hide todo when the total number of tasks is zero. - typeset -g POWERLEVEL9K_TODO_HIDE_ZERO_TOTAL=true - # Hide todo when the number of tasks after filtering is zero. - typeset -g POWERLEVEL9K_TODO_HIDE_ZERO_FILTERED=false - - # Todo format. The following parameters are available within the expansion. - # - # - P9K_TODO_TOTAL_TASK_COUNT The total number of tasks. - # - P9K_TODO_FILTERED_TASK_COUNT The number of tasks after filtering. - # - # These variables correspond to the last line of the output of `todo.sh -p ls`: - # - # TODO: 24 of 42 tasks shown - # - # Here 24 is P9K_TODO_FILTERED_TASK_COUNT and 42 is P9K_TODO_TOTAL_TASK_COUNT. - # - # typeset -g POWERLEVEL9K_TODO_CONTENT_EXPANSION='$P9K_TODO_FILTERED_TASK_COUNT' - - # Custom icon. - # typeset -g POWERLEVEL9K_TODO_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ###########[ timewarrior: timewarrior tracking status (https://timewarrior.net/) ]############ - # Timewarrior color. - # typeset -g POWERLEVEL9K_TIMEWARRIOR_FOREGROUND=255 - # typeset -g POWERLEVEL9K_TIMEWARRIOR_BACKGROUND=8 - - # If the tracked task is longer than 24 characters, truncate and append "…". - # Tip: To always display tasks without truncation, delete the following parameter. - # Tip: To hide task names and display just the icon when time tracking is enabled, set the - # value of the following parameter to "". - typeset -g POWERLEVEL9K_TIMEWARRIOR_CONTENT_EXPANSION='${P9K_CONTENT:0:24}${${P9K_CONTENT:24}:+…}' - - # Custom icon. - # typeset -g POWERLEVEL9K_TIMEWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ##############[ taskwarrior: taskwarrior task count (https://taskwarrior.org/) ]############## - # Taskwarrior color. - # typeset -g POWERLEVEL9K_TASKWARRIOR_FOREGROUND=0 - # typeset -g POWERLEVEL9K_TASKWARRIOR_BACKGROUND=6 - - # Taskwarrior segment format. The following parameters are available within the expansion. - # - # - P9K_TASKWARRIOR_PENDING_COUNT The number of pending tasks: `task +PENDING count`. - # - P9K_TASKWARRIOR_OVERDUE_COUNT The number of overdue tasks: `task +OVERDUE count`. - # - # Zero values are represented as empty parameters. - # - # The default format: - # - # '${P9K_TASKWARRIOR_OVERDUE_COUNT:+"!$P9K_TASKWARRIOR_OVERDUE_COUNT/"}$P9K_TASKWARRIOR_PENDING_COUNT' - # - # typeset -g POWERLEVEL9K_TASKWARRIOR_CONTENT_EXPANSION='$P9K_TASKWARRIOR_PENDING_COUNT' - - # Custom icon. - # typeset -g POWERLEVEL9K_TASKWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ##################################[ context: user@hostname ]################################## - # Context color when running with privileges. - typeset -g POWERLEVEL9K_CONTEXT_ROOT_FOREGROUND=1 - typeset -g POWERLEVEL9K_CONTEXT_ROOT_BACKGROUND=0 - # Context color in SSH without privileges. - typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_FOREGROUND=3 - typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_BACKGROUND=0 - # Default context color (no privileges, no SSH). - typeset -g POWERLEVEL9K_CONTEXT_FOREGROUND=3 - typeset -g POWERLEVEL9K_CONTEXT_BACKGROUND=0 - - # Context format when running with privileges: user@hostname. - typeset -g POWERLEVEL9K_CONTEXT_ROOT_TEMPLATE='%n@%m' - # Context format when in SSH without privileges: user@hostname. - typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_TEMPLATE='%n@%m' - # Default context format (no privileges, no SSH): user@hostname. - typeset -g POWERLEVEL9K_CONTEXT_TEMPLATE='%n@%m' - - # Don't show context unless running with privileges or in SSH. - # Tip: Remove the next line to always show context. - typeset -g POWERLEVEL9K_CONTEXT_{DEFAULT,SUDO}_{CONTENT,VISUAL_IDENTIFIER}_EXPANSION= - - # Custom icon. - # typeset -g POWERLEVEL9K_CONTEXT_VISUAL_IDENTIFIER_EXPANSION='⭐' - # Custom prefix. - # typeset -g POWERLEVEL9K_CONTEXT_PREFIX='with ' - - ###[ virtualenv: python virtual environment (https://docs.python.org/3/library/venv.html) ]### - # Python virtual environment color. - # typeset -g POWERLEVEL9K_VIRTUALENV_FOREGROUND=0 - # typeset -g POWERLEVEL9K_VIRTUALENV_BACKGROUND=4 - # 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. - 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= - # Custom icon. - # typeset -g POWERLEVEL9K_VIRTUALENV_VISUAL_IDENTIFIER_EXPANSION='⭐' - - #####################[ anaconda: conda environment (https://conda.io/) ]###################### - # Anaconda environment color. - # typeset -g POWERLEVEL9K_ANACONDA_FOREGROUND=0 - # typeset -g POWERLEVEL9K_ANACONDA_BACKGROUND=4 - - # Anaconda segment format. The following parameters are available within the expansion. - # - # - CONDA_PREFIX Absolute path to the active Anaconda/Miniconda environment. - # - CONDA_DEFAULT_ENV Name of the active Anaconda/Miniconda environment. - # - CONDA_PROMPT_MODIFIER Configurable prompt modifier (see below). - # - P9K_ANACONDA_PYTHON_VERSION Current python version (python --version). - # - # CONDA_PROMPT_MODIFIER can be configured with the following command: - # - # conda config --set env_prompt '({default_env}) ' - # - # The last argument is a Python format string that can use the following variables: - # - # - prefix The same as CONDA_PREFIX. - # - default_env The same as CONDA_DEFAULT_ENV. - # - name The last segment of CONDA_PREFIX. - # - stacked_env Comma-separated list of names in the environment stack. The first element is - # always the same as default_env. - # - # Note: '({default_env}) ' is the default value of env_prompt. - # - # The default value of POWERLEVEL9K_ANACONDA_CONTENT_EXPANSION expands to $CONDA_PROMPT_MODIFIER - # without the surrounding parentheses, or to the last path component of CONDA_PREFIX if the former - # is empty. - typeset -g POWERLEVEL9K_ANACONDA_CONTENT_EXPANSION='${${${${CONDA_PROMPT_MODIFIER#\(}% }%\)}:-${CONDA_PREFIX:t}}' - - # Custom icon. - # typeset -g POWERLEVEL9K_ANACONDA_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ################[ pyenv: python environment (https://github.com/pyenv/pyenv) ]################ - # Pyenv color. - # typeset -g POWERLEVEL9K_PYENV_FOREGROUND=0 - # typeset -g POWERLEVEL9K_PYENV_BACKGROUND=4 - # Hide python version if it doesn't come from one of these sources. - typeset -g POWERLEVEL9K_PYENV_SOURCES=(shell local global) - # If set to false, hide python version if it's the same as global: - # $(pyenv version-name) == $(pyenv global). - typeset -g POWERLEVEL9K_PYENV_PROMPT_ALWAYS_SHOW=false - # If set to false, hide python version if it's equal to "system". - typeset -g POWERLEVEL9K_PYENV_SHOW_SYSTEM=true - - # Pyenv segment format. The following parameters are available within the expansion. - # - # - P9K_CONTENT Current pyenv environment (pyenv version-name). - # - P9K_PYENV_PYTHON_VERSION Current python version (python --version). - # - # The default format has the following logic: - # - # 1. Display "$P9K_CONTENT $P9K_PYENV_PYTHON_VERSION" if $P9K_PYENV_PYTHON_VERSION is not - # empty and unequal to $P9K_CONTENT. - # 2. Otherwise display just "$P9K_CONTENT". - typeset -g POWERLEVEL9K_PYENV_CONTENT_EXPANSION='${P9K_CONTENT}${${P9K_PYENV_PYTHON_VERSION:#$P9K_CONTENT}:+ $P9K_PYENV_PYTHON_VERSION}' - - # Custom icon. - # typeset -g POWERLEVEL9K_PYENV_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ################[ goenv: go environment (https://github.com/syndbg/goenv) ]################ - # Goenv color. - # typeset -g POWERLEVEL9K_GOENV_FOREGROUND=0 - # typeset -g POWERLEVEL9K_GOENV_BACKGROUND=4 - # Hide go version if it doesn't come from one of these sources. - typeset -g POWERLEVEL9K_GOENV_SOURCES=(shell local global) - # If set to false, hide go version if it's the same as global: - # $(goenv version-name) == $(goenv global). - typeset -g POWERLEVEL9K_GOENV_PROMPT_ALWAYS_SHOW=false - # If set to false, hide go version if it's equal to "system". - typeset -g POWERLEVEL9K_GOENV_SHOW_SYSTEM=true - # Custom icon. - # typeset -g POWERLEVEL9K_GOENV_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ##########[ nodenv: node.js version from nodenv (https://github.com/nodenv/nodenv) ]########## - # Nodenv color. - # typeset -g POWERLEVEL9K_NODENV_FOREGROUND=2 - # typeset -g POWERLEVEL9K_NODENV_BACKGROUND=0 - # Hide node version if it doesn't come from one of these sources. - typeset -g POWERLEVEL9K_NODENV_SOURCES=(shell local global) - # If set to false, hide node version if it's the same as global: - # $(nodenv version-name) == $(nodenv global). - typeset -g POWERLEVEL9K_NODENV_PROMPT_ALWAYS_SHOW=false - # If set to false, hide node version if it's equal to "system". - typeset -g POWERLEVEL9K_NODENV_SHOW_SYSTEM=true - # Custom icon. - # typeset -g POWERLEVEL9K_NODENV_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ##############[ nvm: node.js version from nvm (https://github.com/nvm-sh/nvm) ]############### - # Nvm color. - # typeset -g POWERLEVEL9K_NVM_FOREGROUND=0 - # typeset -g POWERLEVEL9K_NVM_BACKGROUND=5 - # Custom icon. - # typeset -g POWERLEVEL9K_NVM_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ############[ nodeenv: node.js environment (https://github.com/ekalinin/nodeenv) ]############ - # Nodeenv color. - # typeset -g POWERLEVEL9K_NODEENV_FOREGROUND=2 - # typeset -g POWERLEVEL9K_NODEENV_BACKGROUND=0 - # Don't show Node version next to the environment name. - typeset -g POWERLEVEL9K_NODEENV_SHOW_NODE_VERSION=false - # Separate environment name from Node version only with a space. - typeset -g POWERLEVEL9K_NODEENV_{LEFT,RIGHT}_DELIMITER= - # Custom icon. - # typeset -g POWERLEVEL9K_NODEENV_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ##############################[ node_version: node.js version ]############################### - # Node version color. - # typeset -g POWERLEVEL9K_NODE_VERSION_FOREGROUND=7 - # typeset -g POWERLEVEL9K_NODE_VERSION_BACKGROUND=2 - # Show node version only when in a directory tree containing package.json. - typeset -g POWERLEVEL9K_NODE_VERSION_PROJECT_ONLY=true - # Custom icon. - # typeset -g POWERLEVEL9K_NODE_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' - - #######################[ go_version: go version (https://golang.org) ]######################## - # Go version color. - # typeset -g POWERLEVEL9K_GO_VERSION_FOREGROUND=255 - # typeset -g POWERLEVEL9K_GO_VERSION_BACKGROUND=2 - # Show go version only when in a go project subdirectory. - typeset -g POWERLEVEL9K_GO_VERSION_PROJECT_ONLY=true - # Custom icon. - # typeset -g POWERLEVEL9K_GO_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' - - #################[ rust_version: rustc version (https://www.rust-lang.org) ]################## - # Rust version color. - # typeset -g POWERLEVEL9K_RUST_VERSION_FOREGROUND=0 - # typeset -g POWERLEVEL9K_RUST_VERSION_BACKGROUND=208 - # Show rust version only when in a rust project subdirectory. - typeset -g POWERLEVEL9K_RUST_VERSION_PROJECT_ONLY=true - # Custom icon. - # typeset -g POWERLEVEL9K_RUST_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ###############[ dotnet_version: .NET version (https://dotnet.microsoft.com) ]################ - # .NET version color. - # typeset -g POWERLEVEL9K_DOTNET_VERSION_FOREGROUND=7 - # typeset -g POWERLEVEL9K_DOTNET_VERSION_BACKGROUND=5 - # Show .NET version only when in a .NET project subdirectory. - typeset -g POWERLEVEL9K_DOTNET_VERSION_PROJECT_ONLY=true - # Custom icon. - # typeset -g POWERLEVEL9K_DOTNET_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' - - #####################[ php_version: php version (https://www.php.net/) ]###################### - # PHP version color. - typeset -g POWERLEVEL9K_PHP_VERSION_FOREGROUND=0 - typeset -g POWERLEVEL9K_PHP_VERSION_BACKGROUND=5 - # Show PHP version only when in a PHP project subdirectory. - typeset -g POWERLEVEL9K_PHP_VERSION_PROJECT_ONLY=true - # Custom icon. - # typeset -g POWERLEVEL9K_PHP_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ##########[ laravel_version: laravel php framework version (https://laravel.com/) ]########### - # Laravel version color. - typeset -g POWERLEVEL9K_LARAVEL_VERSION_FOREGROUND=1 - typeset -g POWERLEVEL9K_LARAVEL_VERSION_BACKGROUND=7 - # Custom icon. - # typeset -g POWERLEVEL9K_LARAVEL_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' - - #############[ rbenv: ruby version from rbenv (https://github.com/rbenv/rbenv) ]############## - # Rbenv color. - # typeset -g POWERLEVEL9K_RBENV_FOREGROUND=0 - # typeset -g POWERLEVEL9K_RBENV_BACKGROUND=1 - # Hide ruby version if it doesn't come from one of these sources. - typeset -g POWERLEVEL9K_RBENV_SOURCES=(shell local global) - # If set to false, hide ruby version if it's the same as global: - # $(rbenv version-name) == $(rbenv global). - typeset -g POWERLEVEL9K_RBENV_PROMPT_ALWAYS_SHOW=false - # If set to false, hide ruby version if it's equal to "system". - typeset -g POWERLEVEL9K_RBENV_SHOW_SYSTEM=true - # Custom icon. - # typeset -g POWERLEVEL9K_RBENV_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ####################[ java_version: java version (https://www.java.com/) ]#################### - # Java version color. - typeset -g POWERLEVEL9K_JAVA_VERSION_FOREGROUND=1 - typeset -g POWERLEVEL9K_JAVA_VERSION_BACKGROUND=7 - # Show java version only when in a java project subdirectory. - typeset -g POWERLEVEL9K_JAVA_VERSION_PROJECT_ONLY=true - # Show brief version. - typeset -g POWERLEVEL9K_JAVA_VERSION_FULL=false - # Custom icon. - # typeset -g POWERLEVEL9K_JAVA_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ###[ package: name@version from package.json (https://docs.npmjs.com/files/package.json) ]#### - # Package color. - # typeset -g POWERLEVEL9K_PACKAGE_FOREGROUND=0 - # typeset -g POWERLEVEL9K_PACKAGE_BACKGROUND=6 - - # Package format. The following parameters are available within the expansion. - # - # - P9K_PACKAGE_NAME The value of `name` field in package.json. - # - P9K_PACKAGE_VERSION The value of `version` field in package.json. - # - # typeset -g POWERLEVEL9K_PACKAGE_CONTENT_EXPANSION='${P9K_PACKAGE_NAME//\%/%%}@${P9K_PACKAGE_VERSION//\%/%%}' - - # Custom icon. - # typeset -g POWERLEVEL9K_PACKAGE_VISUAL_IDENTIFIER_EXPANSION='⭐' - - #######################[ rvm: ruby version from rvm (https://rvm.io) ]######################## - # Rvm color. - # typeset -g POWERLEVEL9K_RVM_FOREGROUND=0 - # typeset -g POWERLEVEL9K_RVM_BACKGROUND=240 - # Don't show @gemset at the end. - typeset -g POWERLEVEL9K_RVM_SHOW_GEMSET=false - # Don't show ruby- at the front. - typeset -g POWERLEVEL9K_RVM_SHOW_PREFIX=false - # Custom icon. - # typeset -g POWERLEVEL9K_RVM_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ###########[ fvm: flutter version management (https://github.com/leoafarias/fvm) ]############ - # Fvm color. - # typeset -g POWERLEVEL9K_FVM_FOREGROUND=0 - # typeset -g POWERLEVEL9K_FVM_BACKGROUND=4 - # Custom icon. - # typeset -g POWERLEVEL9K_FVM_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ##########[ luaenv: lua version from luaenv (https://github.com/cehoffman/luaenv) ]########### - # Lua color. - # typeset -g POWERLEVEL9K_LUAENV_FOREGROUND=0 - # typeset -g POWERLEVEL9K_LUAENV_BACKGROUND=4 - # Hide lua version if it doesn't come from one of these sources. - typeset -g POWERLEVEL9K_LUAENV_SOURCES=(shell local global) - # If set to false, hide lua version if it's the same as global: - # $(luaenv version-name) == $(luaenv global). - typeset -g POWERLEVEL9K_LUAENV_PROMPT_ALWAYS_SHOW=false - # If set to false, hide lua version if it's equal to "system". - typeset -g POWERLEVEL9K_LUAENV_SHOW_SYSTEM=true - # Custom icon. - # typeset -g POWERLEVEL9K_LUAENV_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ###############[ jenv: java version from jenv (https://github.com/jenv/jenv) ]################ - # Java color. - # typeset -g POWERLEVEL9K_JENV_FOREGROUND=1 - # typeset -g POWERLEVEL9K_JENV_BACKGROUND=7 - # Hide java version if it doesn't come from one of these sources. - typeset -g POWERLEVEL9K_JENV_SOURCES=(shell local global) - # If set to false, hide java version if it's the same as global: - # $(jenv version-name) == $(jenv global). - typeset -g POWERLEVEL9K_JENV_PROMPT_ALWAYS_SHOW=false - # If set to false, hide java version if it's equal to "system". - typeset -g POWERLEVEL9K_JENV_SHOW_SYSTEM=true - # Custom icon. - # typeset -g POWERLEVEL9K_JENV_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ###########[ plenv: perl version from plenv (https://github.com/tokuhirom/plenv) ]############ - # Perl color. - # typeset -g POWERLEVEL9K_PLENV_FOREGROUND=0 - # typeset -g POWERLEVEL9K_PLENV_BACKGROUND=4 - # Hide perl version if it doesn't come from one of these sources. - typeset -g POWERLEVEL9K_PLENV_SOURCES=(shell local global) - # If set to false, hide perl version if it's the same as global: - # $(plenv version-name) == $(plenv global). - typeset -g POWERLEVEL9K_PLENV_PROMPT_ALWAYS_SHOW=false - # If set to false, hide perl version if it's equal to "system". - typeset -g POWERLEVEL9K_PLENV_SHOW_SYSTEM=true - # Custom icon. - # typeset -g POWERLEVEL9K_PLENV_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ############[ phpenv: php version from phpenv (https://github.com/phpenv/phpenv) ]############ - # PHP color. - # typeset -g POWERLEVEL9K_PHPENV_FOREGROUND=0 - # typeset -g POWERLEVEL9K_PHPENV_BACKGROUND=5 - # Hide php version if it doesn't come from one of these sources. - typeset -g POWERLEVEL9K_PHPENV_SOURCES=(shell local global) - # If set to false, hide php version if it's the same as global: - # $(phpenv version-name) == $(phpenv global). - typeset -g POWERLEVEL9K_PHPENV_PROMPT_ALWAYS_SHOW=false - # If set to false, hide PHP version if it's equal to "system". - typeset -g POWERLEVEL9K_PHPENV_SHOW_SYSTEM=true - # Custom icon. - # typeset -g POWERLEVEL9K_PHPENV_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ##########[ haskell_stack: haskell version from stack (https://haskellstack.org/) ]########### - # Haskell color. - # typeset -g POWERLEVEL9K_HASKELL_STACK_FOREGROUND=0 - # typeset -g POWERLEVEL9K_HASKELL_STACK_BACKGROUND=3 - - # Hide haskell version if it doesn't come from one of these sources. - # - # shell: version is set by STACK_YAML - # local: version is set by stack.yaml up the directory tree - # global: version is set by the implicit global project (~/.stack/global-project/stack.yaml) - typeset -g POWERLEVEL9K_HASKELL_STACK_SOURCES=(shell local) - # If set to false, hide haskell version if it's the same as in the implicit global project. - typeset -g POWERLEVEL9K_HASKELL_STACK_ALWAYS_SHOW=true - # Custom icon. - # typeset -g POWERLEVEL9K_HASKELL_STACK_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ################[ terraform: terraform workspace (https://www.terraform.io) ]################# - # POWERLEVEL9K_TERRAFORM_CLASSES is an array with even number of elements. The first element - # in each pair defines a pattern against which the current terraform workspace gets matched. - # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below) - # that gets matched. If you unset all POWERLEVEL9K_TERRAFORM_*CONTENT_EXPANSION parameters, - # you'll see this value in your prompt. The second element of each pair in - # POWERLEVEL9K_TERRAFORM_CLASSES defines the workspace class. Patterns are tried in order. The - # first match wins. - # - # For example, given these settings: - # - # typeset -g POWERLEVEL9K_TERRAFORM_CLASSES=( - # '*prod*' PROD - # '*test*' TEST - # '*' DEFAULT) - # - # If your current terraform workspace is "project_test", its class is TEST because "project_test" - # doesn't match the pattern '*prod*' but does match '*test*'. - # - # You can define different colors, icons and content expansions for different classes: - # - # typeset -g POWERLEVEL9K_TERRAFORM_TEST_FOREGROUND=2 - # typeset -g POWERLEVEL9K_TERRAFORM_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' - # typeset -g POWERLEVEL9K_TERRAFORM_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <' - typeset -g POWERLEVEL9K_TERRAFORM_CLASSES=( - # '*prod*' PROD # These values are examples that are unlikely - # '*test*' TEST # to match your needs. Customize them as needed. - '*' DEFAULT) - typeset -g POWERLEVEL9K_TERRAFORM_DEFAULT_FOREGROUND=4 - typeset -g POWERLEVEL9K_TERRAFORM_DEFAULT_BACKGROUND=0 - # typeset -g POWERLEVEL9K_TERRAFORM_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐' - - #############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]############# - # Show kubecontext only when the the command you are typing invokes one of these tools. - # Tip: Remove the next line to always show kubecontext. - typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito' - - # Kubernetes context classes for the purpose of using different colors, icons and expansions with - # different contexts. - # - # POWERLEVEL9K_KUBECONTEXT_CLASSES is an array with even number of elements. The first element - # in each pair defines a pattern against which the current kubernetes context gets matched. - # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below) - # that gets matched. If you unset all POWERLEVEL9K_KUBECONTEXT_*CONTENT_EXPANSION parameters, - # you'll see this value in your prompt. The second element of each pair in - # POWERLEVEL9K_KUBECONTEXT_CLASSES defines the context class. Patterns are tried in order. The - # first match wins. - # - # For example, given these settings: - # - # typeset -g POWERLEVEL9K_KUBECONTEXT_CLASSES=( - # '*prod*' PROD - # '*test*' TEST - # '*' DEFAULT) - # - # If your current kubernetes context is "deathray-testing/default", its class is TEST - # because "deathray-testing/default" doesn't match the pattern '*prod*' but does match '*test*'. - # - # You can define different colors, icons and content expansions for different classes: - # - # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_FOREGROUND=0 - # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_BACKGROUND=2 - # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' - # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <' - typeset -g POWERLEVEL9K_KUBECONTEXT_CLASSES=( - # '*prod*' PROD # These values are examples that are unlikely - # '*test*' TEST # to match your needs. Customize them as needed. - '*' DEFAULT) - typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_FOREGROUND=7 - typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_BACKGROUND=5 - # typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐' - - # Use POWERLEVEL9K_KUBECONTEXT_CONTENT_EXPANSION to specify the content displayed by kubecontext - # segment. Parameter expansions are very flexible and fast, too. See reference: - # http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion. - # - # Within the expansion the following parameters are always available: - # - # - P9K_CONTENT The content that would've been displayed if there was no content - # expansion defined. - # - P9K_KUBECONTEXT_NAME The current context's name. Corresponds to column NAME in the - # output of `kubectl config get-contexts`. - # - P9K_KUBECONTEXT_CLUSTER The current context's cluster. Corresponds to column CLUSTER in the - # output of `kubectl config get-contexts`. - # - P9K_KUBECONTEXT_NAMESPACE The current context's namespace. Corresponds to column NAMESPACE - # in the output of `kubectl config get-contexts`. If there is no - # namespace, the parameter is set to "default". - # - P9K_KUBECONTEXT_USER The current context's user. Corresponds to column AUTHINFO in the - # output of `kubectl config get-contexts`. - # - # If the context points to Google Kubernetes Engine (GKE) or Elastic Kubernetes Service (EKS), - # the following extra parameters are available: - # - # - P9K_KUBECONTEXT_CLOUD_NAME Either "gke" or "eks". - # - P9K_KUBECONTEXT_CLOUD_ACCOUNT Account/project ID. - # - P9K_KUBECONTEXT_CLOUD_ZONE Availability zone. - # - P9K_KUBECONTEXT_CLOUD_CLUSTER Cluster. - # - # P9K_KUBECONTEXT_CLOUD_* parameters are derived from P9K_KUBECONTEXT_CLUSTER. For example, - # if P9K_KUBECONTEXT_CLUSTER is "gke_my-account_us-east1-a_my-cluster-01": - # - # - P9K_KUBECONTEXT_CLOUD_NAME=gke - # - P9K_KUBECONTEXT_CLOUD_ACCOUNT=my-account - # - P9K_KUBECONTEXT_CLOUD_ZONE=us-east1-a - # - P9K_KUBECONTEXT_CLOUD_CLUSTER=my-cluster-01 - # - # If P9K_KUBECONTEXT_CLUSTER is "arn:aws:eks:us-east-1:123456789012:cluster/my-cluster-01": - # - # - P9K_KUBECONTEXT_CLOUD_NAME=eks - # - P9K_KUBECONTEXT_CLOUD_ACCOUNT=123456789012 - # - P9K_KUBECONTEXT_CLOUD_ZONE=us-east-1 - # - P9K_KUBECONTEXT_CLOUD_CLUSTER=my-cluster-01 - typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION= - # Show P9K_KUBECONTEXT_CLOUD_CLUSTER if it's not empty and fall back to P9K_KUBECONTEXT_NAME. - POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${P9K_KUBECONTEXT_CLOUD_CLUSTER:-${P9K_KUBECONTEXT_NAME}}' - # Append the current context's namespace if it's not "default". - POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${${:-/$P9K_KUBECONTEXT_NAMESPACE}:#/default}' - - # Custom prefix. - # typeset -g POWERLEVEL9K_KUBECONTEXT_PREFIX='at ' - - #[ aws: aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) ]# - # Show aws only when the the command you are typing invokes one of these tools. - # Tip: Remove the next line to always show aws. - typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|terraform|pulumi' - - # POWERLEVEL9K_AWS_CLASSES is an array with even number of elements. The first element - # in each pair defines a pattern against which the current AWS profile gets matched. - # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below) - # that gets matched. If you unset all POWERLEVEL9K_AWS_*CONTENT_EXPANSION parameters, - # you'll see this value in your prompt. The second element of each pair in - # POWERLEVEL9K_AWS_CLASSES defines the profile class. Patterns are tried in order. The - # first match wins. - # - # For example, given these settings: - # - # typeset -g POWERLEVEL9K_AWS_CLASSES=( - # '*prod*' PROD - # '*test*' TEST - # '*' DEFAULT) - # - # If your current AWS profile is "company_test", its class is TEST - # because "company_test" doesn't match the pattern '*prod*' but does match '*test*'. - # - # You can define different colors, icons and content expansions for different classes: - # - # typeset -g POWERLEVEL9K_AWS_TEST_FOREGROUND=28 - # typeset -g POWERLEVEL9K_AWS_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' - # typeset -g POWERLEVEL9K_AWS_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <' - typeset -g POWERLEVEL9K_AWS_CLASSES=( - # '*prod*' PROD # These values are examples that are unlikely - # '*test*' TEST # to match your needs. Customize them as needed. - '*' DEFAULT) - # typeset -g POWERLEVEL9K_AWS_DEFAULT_FOREGROUND=7 - # typeset -g POWERLEVEL9K_AWS_DEFAULT_BACKGROUND=1 - # typeset -g POWERLEVEL9K_AWS_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐' - - #[ aws_eb_env: aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/) ]# - # AWS Elastic Beanstalk environment color. - # typeset -g POWERLEVEL9K_AWS_EB_ENV_FOREGROUND=2 - # typeset -g POWERLEVEL9K_AWS_EB_ENV_BACKGROUND=0 - # Custom icon. - # typeset -g POWERLEVEL9K_AWS_EB_ENV_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ##########[ azure: azure account name (https://docs.microsoft.com/en-us/cli/azure) ]########## - # Show azure only when the the command you are typing invokes one of these tools. - # Tip: Remove the next line to always show azure. - typeset -g POWERLEVEL9K_AZURE_SHOW_ON_COMMAND='az|terraform|pulumi' - # Azure account name color. - # typeset -g POWERLEVEL9K_AZURE_FOREGROUND=7 - # typeset -g POWERLEVEL9K_AZURE_BACKGROUND=4 - # Custom icon. - # typeset -g POWERLEVEL9K_AZURE_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ##########[ gcloud: google cloud account and project (https://cloud.google.com/) ]########### - # Show gcloud only when the the command you are typing invokes one of these tools. - # Tip: Remove the next line to always show gcloud. - typeset -g POWERLEVEL9K_GCLOUD_SHOW_ON_COMMAND='gcloud|gcs' - # Google cloud color. - # typeset -g POWERLEVEL9K_GCLOUD_FOREGROUND=7 - # typeset -g POWERLEVEL9K_GCLOUD_BACKGROUND=4 - - # Google cloud format. Change the value of POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION and/or - # POWERLEVEL9K_GCLOUD_COMPLETE_CONTENT_EXPANSION if the default is too verbose or not informative - # enough. You can use the following parameters in the expansions. Each of them corresponds to the - # output of `gcloud` tool. - # - # Parameter | Source - # -------------------------|-------------------------------------------------------------------- - # P9K_GCLOUD_CONFIGURATION | gcloud config configurations list --format='value(name)' - # P9K_GCLOUD_ACCOUNT | gcloud config get-value account - # 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 '%%'. - # - # 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 - # prompt segment is in state PARTIAL. When project name gets known, P9K_GCLOUD_PROJECT_NAME gets - # set and gcloud prompt segment transitions to state COMPLETE. - # - # You can customize the format, icon and colors of gcloud segment separately for states PARTIAL - # and COMPLETE. You can also hide gcloud in state PARTIAL by setting - # POWERLEVEL9K_GCLOUD_PARTIAL_VISUAL_IDENTIFIER_EXPANSION and - # POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION to empty. - typeset -g POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION='${P9K_GCLOUD_PROJECT_ID//\%/%%}' - typeset -g POWERLEVEL9K_GCLOUD_COMPLETE_CONTENT_EXPANSION='${P9K_GCLOUD_PROJECT_NAME//\%/%%}' - - # Send a request to Google (by means of `gcloud projects describe ...`) to obtain project name - # this often. Negative value disables periodic polling. In this mode project name is retrieved - # only when the current configuration, account or project id changes. - typeset -g POWERLEVEL9K_GCLOUD_REFRESH_PROJECT_NAME_SECONDS=60 - - # Custom icon. - # typeset -g POWERLEVEL9K_GCLOUD_VISUAL_IDENTIFIER_EXPANSION='⭐' - - #[ google_app_cred: google application credentials (https://cloud.google.com/docs/authentication/production) ]# - # Show google_app_cred only when the the command you are typing invokes one of these tools. - # Tip: Remove the next line to always show google_app_cred. - typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_SHOW_ON_COMMAND='terraform|pulumi' - - # Google application credentials classes for the purpose of using different colors, icons and - # expansions with different credentials. - # - # POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES is an array with even number of elements. The first - # element in each pair defines a pattern against which the current kubernetes context gets - # matched. More specifically, it's P9K_CONTENT prior to the application of context expansion - # (see below) that gets matched. If you unset all POWERLEVEL9K_GOOGLE_APP_CRED_*CONTENT_EXPANSION - # parameters, you'll see this value in your prompt. The second element of each pair in - # POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES defines the context class. Patterns are tried in order. - # The first match wins. - # - # For example, given these settings: - # - # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES=( - # '*:*prod*:*' PROD - # '*:*test*:*' TEST - # '*' DEFAULT) - # - # If your current Google application credentials is "service_account deathray-testing x@y.com", - # its class is TEST because it doesn't match the pattern '* *prod* *' but does match '* *test* *'. - # - # You can define different colors, icons and content expansions for different classes: - # - # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_FOREGROUND=28 - # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' - # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_CONTENT_EXPANSION='$P9K_GOOGLE_APP_CRED_PROJECT_ID' - typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES=( - # '*:*prod*:*' PROD # These values are examples that are unlikely - # '*:*test*:*' TEST # to match your needs. Customize them as needed. - '*' DEFAULT) - # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_FOREGROUND=7 - # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_BACKGROUND=4 - # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐' - - # Use POWERLEVEL9K_GOOGLE_APP_CRED_CONTENT_EXPANSION to specify the content displayed by - # google_app_cred segment. Parameter expansions are very flexible and fast, too. See reference: - # http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion. - # - # You can use the following parameters in the expansion. Each of them corresponds to one of the - # fields in the JSON file pointed to by GOOGLE_APPLICATION_CREDENTIALS. - # - # Parameter | JSON key file field - # ---------------------------------+--------------- - # P9K_GOOGLE_APP_CRED_TYPE | type - # 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 '%%'. - typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_CONTENT_EXPANSION='${P9K_GOOGLE_APP_CRED_PROJECT_ID//\%/%%}' - - ###############################[ public_ip: public IP address ]############################### - # Public IP color. - # typeset -g POWERLEVEL9K_PUBLIC_IP_FOREGROUND=7 - # typeset -g POWERLEVEL9K_PUBLIC_IP_BACKGROUND=0 - # Custom icon. - # typeset -g POWERLEVEL9K_PUBLIC_IP_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ########################[ vpn_ip: virtual private network indicator ]######################### - # VPN IP color. - # typeset -g POWERLEVEL9K_VPN_IP_FOREGROUND=0 - # typeset -g POWERLEVEL9K_VPN_IP_BACKGROUND=6 - # When on VPN, show just an icon without the IP address. - # Tip: To display the private IP address when on VPN, remove the next line. - 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='(wg|(.*tun))[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. - typeset -g POWERLEVEL9K_VPN_IP_SHOW_ALL=false - # Custom icon. - # typeset -g POWERLEVEL9K_VPN_IP_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ###########[ ip: ip address and bandwidth usage for a specified network interface ]########### - # IP color. - typeset -g POWERLEVEL9K_IP_BACKGROUND=4 - typeset -g POWERLEVEL9K_IP_FOREGROUND=0 - # The following parameters are accessible within the expansion: - # - # Parameter | Meaning - # ----------------------+--------------- - # P9K_IP_IP | IP address - # P9K_IP_INTERFACE | network interface - # P9K_IP_RX_BYTES | total number of bytes received - # P9K_IP_TX_BYTES | total number of bytes sent - # P9K_IP_RX_RATE | receive rate (since last prompt) - # P9K_IP_TX_RATE | send rate (since last prompt) - typeset -g POWERLEVEL9K_IP_CONTENT_EXPANSION='${P9K_IP_RX_RATE:+⇣$P9K_IP_RX_RATE }${P9K_IP_TX_RATE:+⇡$P9K_IP_TX_RATE }$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.*' - # Custom icon. - # typeset -g POWERLEVEL9K_IP_VISUAL_IDENTIFIER_EXPANSION='⭐' - - #########################[ proxy: system-wide http/https/ftp proxy ]########################## - # Proxy color. - # typeset -g POWERLEVEL9K_PROXY_FOREGROUND=4 - # typeset -g POWERLEVEL9K_PROXY_BACKGROUND=0 - # Custom icon. - # typeset -g POWERLEVEL9K_PROXY_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ################################[ battery: internal battery ]################################# - # Show battery in red when it's below this level and not connected to power supply. - typeset -g POWERLEVEL9K_BATTERY_LOW_THRESHOLD=20 - typeset -g POWERLEVEL9K_BATTERY_LOW_FOREGROUND=1 - # Show battery in green when it's charging or fully charged. - typeset -g POWERLEVEL9K_BATTERY_{CHARGING,CHARGED}_FOREGROUND=2 - # Show battery in yellow when it's discharging. - typeset -g POWERLEVEL9K_BATTERY_DISCONNECTED_FOREGROUND=3 - # Battery pictograms going from low to high level of charge. - typeset -g POWERLEVEL9K_BATTERY_STAGES='\uf58d\uf579\uf57a\uf57b\uf57c\uf57d\uf57e\uf57f\uf580\uf581\uf578' - # Don't show the remaining time to charge/discharge. - typeset -g POWERLEVEL9K_BATTERY_VERBOSE=false - # typeset -g POWERLEVEL9K_BATTERY_BACKGROUND=0 - - #####################################[ wifi: wifi speed ]##################################### - # WiFi color. - # typeset -g POWERLEVEL9K_WIFI_FOREGROUND=0 - # typeset -g POWERLEVEL9K_WIFI_BACKGROUND=4 - # Custom icon. - # typeset -g POWERLEVEL9K_WIFI_VISUAL_IDENTIFIER_EXPANSION='⭐' - - # Use different colors and icons depending on signal strength ($P9K_WIFI_BARS). - # - # # Wifi colors and icons for different signal strength levels (low to high). - # typeset -g my_wifi_fg=(0 0 0 0 0) # <-- change these values - # typeset -g my_wifi_icon=('WiFi' 'WiFi' 'WiFi' 'WiFi' 'WiFi') # <-- change these values - # - # typeset -g POWERLEVEL9K_WIFI_CONTENT_EXPANSION='%F{${my_wifi_fg[P9K_WIFI_BARS+1]}}$P9K_WIFI_LAST_TX_RATE Mbps' - # typeset -g POWERLEVEL9K_WIFI_VISUAL_IDENTIFIER_EXPANSION='%F{${my_wifi_fg[P9K_WIFI_BARS+1]}}${my_wifi_icon[P9K_WIFI_BARS+1]}' - # - # The following parameters are accessible within the expansions: - # - # 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_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. - # typeset -g POWERLEVEL9K_TIME_FOREGROUND=0 - # typeset -g POWERLEVEL9K_TIME_BACKGROUND=7 - # Format for the current time: 09:51:02. See `man 3 strftime`. - typeset -g POWERLEVEL9K_TIME_FORMAT='%D{%H:%M:%S}' - # If set to true, time will update when you hit enter. This way prompts for the past - # commands will contain the start times of their commands as opposed to the default - # behavior where they contain the end times of their preceding commands. - typeset -g POWERLEVEL9K_TIME_UPDATE_ON_COMMAND=false - # Custom icon. - # typeset -g POWERLEVEL9K_TIME_VISUAL_IDENTIFIER_EXPANSION='⭐' - # Custom prefix. - # typeset -g POWERLEVEL9K_TIME_PREFIX='at ' - - # Example of a user-defined prompt segment. Function prompt_example will be called on every - # prompt if `example` prompt segment is added to POWERLEVEL9K_LEFT_PROMPT_ELEMENTS or - # POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS. It displays an icon and yellow text on red background - # greeting the user. - # - # Type `p10k help segment` for documentation and a more sophisticated example. - function prompt_example() { - p10k segment -b 1 -f 3 -i '⭐' -t 'hello, %n' - } - - # User-defined prompt segments may optionally provide an instant_prompt_* function. Its job - # is to generate the prompt segment for display in instant prompt. See - # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt. - # - # Powerlevel10k will call instant_prompt_* at the same time as the regular prompt_* function - # and will record all `p10k segment` calls it makes. When displaying instant prompt, Powerlevel10k - # will replay these calls without actually calling instant_prompt_*. It is imperative that - # instant_prompt_* always makes the same `p10k segment` calls regardless of environment. If this - # rule is not observed, the content of instant prompt will be incorrect. - # - # Usually, you should either not define instant_prompt_* or simply call prompt_* from it. If - # instant_prompt_* is not defined for a segment, the segment won't be shown in instant prompt. - function instant_prompt_example() { - # Since prompt_example always makes the same `p10k segment` calls, we can call it from - # instant_prompt_example. This will give us the same `example` prompt segment in the instant - # and regular prompts. - prompt_example - } - - # User-defined prompt segments can be customized the same way as built-in segments. - # typeset -g POWERLEVEL9K_EXAMPLE_FOREGROUND=3 - # typeset -g POWERLEVEL9K_EXAMPLE_VISUAL_IDENTIFIER_EXPANSION='⭐' - - # Transient prompt works similarly to the builtin transient_rprompt option. It trims down prompt - # when accepting a command line. Supported values: - # - # - off: Don't change prompt when accepting a command line. - # - always: Trim down prompt when accepting a command line. - # - same-dir: Trim down prompt when accepting a command line unless this is the first command - # typed after changing current working directory. - typeset -g POWERLEVEL9K_TRANSIENT_PROMPT=always - - # Instant prompt mode. - # - # - off: Disable instant prompt. Choose this if you've tried instant prompt and found - # it incompatible with your zsh configuration files. - # - quiet: Enable instant prompt and don't print warnings when detecting console output - # during zsh initialization. Choose this if you've read and understood - # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt. - # - verbose: Enable instant prompt and print a warning when detecting console output during - # zsh initialization. Choose this if you've never tried instant prompt, haven't - # seen the warning, or if you are unsure what this all means. - typeset -g POWERLEVEL9K_INSTANT_PROMPT=verbose - - # Hot reload allows you to change POWERLEVEL9K options after Powerlevel10k has been initialized. - # For example, you can type POWERLEVEL9K_BACKGROUND=red and see your prompt turn red. Hot reload - # can slow down prompt by 1-2 milliseconds, so it's better to keep it turned off unless you - # really need it. - typeset -g POWERLEVEL9K_DISABLE_HOT_RELOAD=true - - # If p10k is already loaded, reload configuration. - # This works even with POWERLEVEL9K_DISABLE_HOT_RELOAD=true. - (( ! $+functions[p10k] )) || p10k reload -} - -# Tell `p10k configure` which file it should overwrite. -typeset -g POWERLEVEL9K_CONFIG_FILE=${${(%):-%x}:a} - -(( ${#p10k_config_opts} )) && setopt ${p10k_config_opts[@]} -'builtin' 'unset' 'p10k_config_opts' diff --git a/.xinitrc b/.xinitrc index f3fbab0..ed2dde5 100755 --- a/.xinitrc +++ b/.xinitrc @@ -1,5 +1,4 @@ export PATH=$PATH:/home/rinri/scripts:/home/rinri/scripts/Discord:/home/rinri/.local/bin -~/scripts/automount.sh & while true; do # Log stderror to a file dwm 2> ~/.dwm.log diff --git a/.zshrc b/.zshrc index c877ef2..98f5652 100755 --- a/.zshrc +++ b/.zshrc @@ -1,16 +1,7 @@ -# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. -# Initialization code that may require console input (password prompts, [y/n] -# confirmations, etc.) must go above this block; everything else may go below. -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 -export QT_QPA_PLATFORMTHEME=gtk2 export EDITOR="nvim" export TERMINAL="st" -export BROWSER="firefox" export LC_CTYPE=ru_RU.UTF-8 -export WECHALLUSER="rinri" -export WECHALLTOKEN="5F489-F2870-9F223-96264-58717-4AAB4" +#export FIFTPATH="/home/rinri/smartcontract/fiftlib" # less + man export LESS_TERMCAP_mb=$'\e[1;32m' @@ -32,12 +23,8 @@ alias ls="ls --color" alias ll="ls --color -l" alias la="ls --color -A" alias lal="ls --color -Al" -alias huion="xsetwacom set 'HUION Huion Tablet Pen stylus' Area 4384 3990 24384 15240" alias dxyz="ssh root@rinri-d.xyz" -alias mrcon="mcrcon -H rinri-d.xyz -p -t" alias vim="nvim" -alias minemus="mpv --no-video https://youtu.be/Dg0IjOzopYU" -alias weebcabin="~/scripts/anime.sh" alias cal="cal -m" alias sudo="doas" @@ -51,7 +38,6 @@ bindkey -v zstyle :compinstall filename '/home/rinri/.zshrc' autoload -U compinit -zstyle ':completion:*' menu select zmodload zsh/complist compinit _comp_options+=(globdots) @@ -60,12 +46,15 @@ bindkey -s '^o' 'fzfcd\n' bindkey -M viins '\e.' insert-last-word # End of lines added by compinstall -source ~/src/powerlevel10k/powerlevel10k.zsh-theme source ~/src/antigen.zsh source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh +source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.plugin.zsh antigen bundle jeffreytse/zsh-vi-mode antigen apply +ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=8" +ZSH_AUTOSUGGEST_STRATEGY=(history completion) + # The plugin will auto execute this zvm_after_init function function zvm_after_init() { source /usr/share/fzf/completion.zsh @@ -77,6 +66,6 @@ export FZF_DEFAULT_COMMAND="fd --color=never --type f --type l --follow --exclud export FZF_DEFAULT_OPTS="--height 50% -1 --reverse --multi --inline-info --preview='[[ \$(file --mime {}) =~ binary ]] && echo {} is a binary file || (bat --style=numbers --color=always {} || cat {}) 2> /dev/null | head -300' --preview-window='right:hidden:wrap' --bind='f3:execute(bat --style=numbers {} || less -f {}),f2:toggle-preview,ctrl-d:half-page-down,ctrl-u:half-page-up,ctrl-a:select-all+accept,ctrl-y:execute-silent(echo {+} | pbcopy)'" -# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. -[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh if [ -e /home/rinri/.nix-profile/etc/profile.d/nix.sh ]; then . /home/rinri/.nix-profile/etc/profile.d/nix.sh; fi # added by Nix installer + +eval "$(starship init zsh)" diff --git a/README.md b/README.md index 78688e9..261b069 100755 --- a/README.md +++ b/README.md @@ -1,36 +1,29 @@ # My configuration -- OS: [Arch Linux](https://archlinux.org) +- OS: [arch linux](https://archlinux.org) - WM: [dwm](https://dwm.suckless.org/) - Terminal: [st](https://st.suckless.org/) - Editor: [neovim](https://neovim.io/) +- Editor: [doom emacs](https://github.com/doomemacs/doomemacs) - Font: DejaVuMono Nerd Patched -- X11 Compositor: [picom](https://github.com/yshui/picom) (dual_kawase blur + rounded corners) +- X11 Compositor: [picom](https://github.com/yshui/picom) - Music player: [cmus](https://github.com/cmus/cmus) -- Video player: [mpv](https://mpv.io/) -- Notifications: [Dunst](https://github.com/dunst-project/dunst) +- Notifications: [dunst](https://github.com/dunst-project/dunst) - Status bar: [slstatus](https://tools.suckless.org/slstatus/) -- Wallpaper: [pixiv](https://wallhaven.cc/w/p8q1x3) +- Wallpaper: [pixiv](https://www.pixiv.net/member_illust.php?mode=medium&illust_id=47154393) ## Screenshots -### Clear: ![clear](clear.jpg) -### Neofetch: ![neofetch](neofetch.jpg) -### Music player: ![cmus](cmus.jpg) -### Text editor (neovim): ![neovim](vim.jpg) -### Notifications (dunst): +![doom emacs](emacs.jpg) + ![dunst](dunst.jpg) -### Browser (firefox): ![firefox](firefox.jpg) - -### Wallpaper: -![wall](newwall.jpg) diff --git a/X11/10-monitor.conf b/X11/10-monitor.conf new file mode 100644 index 0000000..ef60b15 --- /dev/null +++ b/X11/10-monitor.conf @@ -0,0 +1,9 @@ +Section "Monitor" + Identifier "eDP" +EndSection + +Section "Monitor" + Identifier "HDMI-A-0" + Option "RightOf" "eDP" + Option "Primary" "true" +EndSection diff --git a/X11/10-tablet.conf b/X11/10-tablet.conf new file mode 100644 index 0000000..977e8fd --- /dev/null +++ b/X11/10-tablet.conf @@ -0,0 +1,6 @@ +Section "InputClass" + Identifier "Tablet" + Driver "wacom" + MatchDevicePath "/dev/input/event*" + MatchUSBID "256c:006d" +EndSection \ No newline at end of file diff --git a/X11/20-amdgpu.conf b/X11/20-amdgpu.conf new file mode 100644 index 0000000..79ed888 --- /dev/null +++ b/X11/20-amdgpu.conf @@ -0,0 +1,5 @@ +Section "Device" + Identifier "AMD Graphics" + Driver "amdgpu" + Option "TearFree" "true" +EndSection diff --git a/X11/30-touchpad.conf b/X11/30-touchpad.conf new file mode 100644 index 0000000..5d001a4 --- /dev/null +++ b/X11/30-touchpad.conf @@ -0,0 +1,8 @@ +Section "InputClass" + Identifier "devname" + Driver "libinput" + MatchIsTouchpad "on" + Option "Tapping" "on" + Option "ClickMethod" "clickfinger" + Option "TappingButtonMap" "lmr" +EndSection \ No newline at end of file diff --git a/clear.jpg b/clear.jpg index fa9a1d9..c0009e4 100644 Binary files a/clear.jpg and b/clear.jpg differ diff --git a/cmus.jpg b/cmus.jpg index 0293331..cba56d7 100644 Binary files a/cmus.jpg and b/cmus.jpg differ diff --git a/dunst.jpg b/dunst.jpg index 9e01238..ef2c623 100644 Binary files a/dunst.jpg and b/dunst.jpg differ diff --git a/emacs.jpg b/emacs.jpg new file mode 100644 index 0000000..2049497 Binary files /dev/null and b/emacs.jpg differ diff --git a/firefox.jpg b/firefox.jpg index 3153c40..d788a78 100644 Binary files a/firefox.jpg and b/firefox.jpg differ diff --git a/neofetch.jpg b/neofetch.jpg index 425c51b..b4a23d5 100644 Binary files a/neofetch.jpg and b/neofetch.jpg differ diff --git a/newwall.jpg b/newwall.jpg deleted file mode 100644 index e6ea792..0000000 Binary files a/newwall.jpg and /dev/null differ diff --git a/scripts/.gitignore b/scripts/.gitignore new file mode 100644 index 0000000..0f8323f --- /dev/null +++ b/scripts/.gitignore @@ -0,0 +1,3 @@ +anime.sh +upload.sh +download.sh \ No newline at end of file diff --git a/scripts/daily.sh b/scripts/daily.sh index cff5d79..0491eab 100755 --- a/scripts/daily.sh +++ b/scripts/daily.sh @@ -1,3 +1,3 @@ #!/bin/sh -notify-send "Daily Fortune" "$(fortune|cowsay)" +/home/rinri/scripts/root-notify.sh "Daily Fortune" "$(fortune|cowsay -W 35)" diff --git a/scripts/dublicatescreen.sh b/scripts/dublicatescreen.sh deleted file mode 100755 index bf38080..0000000 --- a/scripts/dublicatescreen.sh +++ /dev/null @@ -1 +0,0 @@ -xrandr --output HDMI-1 --same-as eDP-1 \ No newline at end of file diff --git a/scripts/foreach.sh b/scripts/foreach.sh index 842690c..b9c9207 100755 --- a/scripts/foreach.sh +++ b/scripts/foreach.sh @@ -2,5 +2,5 @@ while read -r p; do echo "Copying $p..." - cp "$p" fav + #cp "$p" fav done \ No newline at end of file diff --git a/scripts/funnymic.sh b/scripts/funnymic.sh deleted file mode 100755 index 24d77b1..0000000 --- a/scripts/funnymic.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -pactl set-source-volume alsa_input.pci-0000_04_00.6.analog-stereo 400% \ No newline at end of file diff --git a/scripts/kz.sh b/scripts/kz.sh deleted file mode 100755 index 8449087..0000000 --- a/scripts/kz.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -setxkbmap -layout us,ru,kz -option grp:alt_shift_toggle diff --git a/scripts/mute.sh b/scripts/mute.sh new file mode 100755 index 0000000..e0a89ab --- /dev/null +++ b/scripts/mute.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +card=$(aplay -l | grep Analog | awk '{print $2}' | head -c-2) + +if [ "$(amixer -c"$card" get "Capture" | grep -c "\[on\]")" -gt 0 ]; then + [ $# -ge 1 ] && amixer -c"$card" set 'Capture' nocap + [ $# -ge 1 ] && notify-send -t 700 -i "mic-off" "Microphone Muted!" + printf "" +else + [ $# -ge 1 ] && amixer -c"$card" set 'Capture' cap + [ $# -ge 1 ] && notify-send -t 700 -i "mic-on" "Microphone Activated!" + printf "" +fi diff --git a/scripts/normalmic.sh b/scripts/normalmic.sh deleted file mode 100755 index 87e248e..0000000 --- a/scripts/normalmic.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -pactl set-source-volume alsa_input.pci-0000_04_00.6.analog-stereo 25% diff --git a/scripts/playmus.sh b/scripts/playmus.sh new file mode 100755 index 0000000..f5c60b0 --- /dev/null +++ b/scripts/playmus.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +artist="$(playerctl metadata artist)" +title="$(playerctl metadata title)" + +if [ $# -ge 1 ]; then + if [ "$1" -eq 1 ]; then + playerctl play-pause + else + [ "$1" -eq 2 ] && playerctl next + [ "$1" -eq 3 ] && playerctl previous + artist="$(playerctl metadata artist)" + title="$(playerctl metadata title)" + notify-send -i "media-playback-playing" "Playing now..." "$artist - $title" + fi +else + notify-send -i "media-playback-playing" "Playing now..." "$artist - $title" +fi + diff --git a/scripts/pomodoro.sh b/scripts/pomodoro.sh new file mode 100755 index 0000000..3cf5631 --- /dev/null +++ b/scripts/pomodoro.sh @@ -0,0 +1,63 @@ +#!/bin/sh + +sl=25 # study session time in minutes +bl=5 # break time in minutes +bll=20 # long break time in minutes +bls=4 # number of study sessions before long break +ringtone="$HOME/Media/warcraft-soundtrack/2004 World of Warcraft/ringtone.flac" + +sessions=0 # number of sessions passed +# if you kill and restart pomodoro.sh, you can specify the number of sessions passed +[ $# -gt 0 ] && sessions=$1 + +printf "\rStudy time! Sessions done: %d\n" "$sessions" +notify-send -i "media-playback-playing" "Study time!" +start="$(date +%s)" # start time stamp +state=0 # 0 - study, 1 - relax, 2 - long break +tl=$sl # current time limit + +while : +do + now="$(date +%s)" + + left=$((tl * 60 - (now - start))) + + printf "\033[K\r%02d:%02d" "$((left / 60))" "$((left % 60))" + + if [ $left -le 0 ]; then + printf "\033[1A\033[K" + if [ $state -eq 0 ]; then + sessions=$((sessions + 1)) + if [ $((sessions % bls)) -eq 0 ]; then + state=2 + printf "\rLong break time! Sessions done: %d\n" "$sessions" + notify-send -i "media-playback-paused" "Long break time!" + mpv --no-vid --no-terminal "$ringtone" & + tl=$bll + else + state=1 + printf "\rBreak time! Sessions done: %d\n" "$sessions" + notify-send -i "media-playback-paused" "Break time!" + mpv --no-vid --no-terminal "$ringtone" & + tl=$bl + fi + else + state=0 + printf "\rStudy time! Sessions done: %d\n" "$sessions" + notify-send -i "media-playback-playing" "Study time!" + mpv --no-vid --no-terminal "$ringtone" & + tl=$sl + fi + + mpvpid=$! + + printf "%s " "Press Enter to start the timer" + read ans + printf "\033[1A\033[K" + + start="$(date +%s)" + kill $mpvpid 2> /dev/null + fi + + sleep 1 +done \ No newline at end of file diff --git a/scripts/poweroff.sh b/scripts/poweroff.sh index 8ef2539..3a60e39 100755 --- a/scripts/poweroff.sh +++ b/scripts/poweroff.sh @@ -3,8 +3,8 @@ chosen=$(echo "Shutdown\nReboot\nSuspend\nHibernate" | dmenu -i -p "Power Management") case "$chosen" in - Shutdown) sudo poweroff;; - Reboot) sudo reboot;; + Shutdown) killall picom; systemctl poweroff;; + Reboot) killall picom; systemctl reboot;; Suspend) slock & systemctl suspend;; Hibernate) systemctl hibernate;; esac diff --git a/scripts/root-notify.sh b/scripts/root-notify.sh new file mode 100755 index 0000000..bf801c0 --- /dev/null +++ b/scripts/root-notify.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +#Detect the name of the display in use +display=":$(find /tmp/.X11-unix/* | sed 's#/tmp/.X11-unix/X##' | head -n 1)" + +#Detect the user using such display +user="$(who | grep "tty1" | awk '{print $1}' | head -n 1)" + +#Detect the id of the user +uid="$(id -u "$user")" + +sudo -u "$user" DISPLAY="$display" DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/"$uid"/bus notify-send "$@" diff --git a/scripts/rus.sh b/scripts/rus.sh deleted file mode 100755 index f4c2cda..0000000 --- a/scripts/rus.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -setxkbmap -layout us,ru -option grp:alt_shift_toggle diff --git a/scripts/screenkey.sh b/scripts/screenkey.sh index 937ad4c..09b90d4 100755 --- a/scripts/screenkey.sh +++ b/scripts/screenkey.sh @@ -1 +1,2 @@ -screenkey --opacity 0.3 -p fixed -g 350x70-10-100 \ No newline at end of file +#screenkey --opacity 0.3 -p fixed -g 500x70-10-100 +screenkey --opacity 0.3 -p fixed -g 500x70+3320-100 \ No newline at end of file diff --git a/scripts/screenshot.sh b/scripts/screenshot.sh index debd4a9..a02623e 100755 --- a/scripts/screenshot.sh +++ b/scripts/screenshot.sh @@ -2,9 +2,7 @@ if [ $# -eq 0 ] then - magick import -window root ~/Screenshots/"$(date +%Y.%m.%d-%T)".jpg + flameshot screen -n $(($(xrandr | grep -c " connected") - 1)) -c -p ~/Screenshots/"$(date +%Y.%m.%d-%T)".jpg else -magick import temp.jpg -xclip -selection clipboard -t image/png temp.jpg -rm temp.png -fi \ No newline at end of file + flameshot gui -c +fi diff --git a/scripts/setvolume.sh b/scripts/setvolume.sh new file mode 100755 index 0000000..568d136 --- /dev/null +++ b/scripts/setvolume.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +# Internal speaker + +# Microphone +amixer -c 1 sset 'Capture' 100% +amixer -c 1 sset 'Digital' 100% +amixer -c 1 sset 'Internal Mic Boost' 0% +amixer -c 1 sset 'Headset Mic Boost' 0% \ No newline at end of file diff --git a/scripts/showcal.sh b/scripts/showcal.sh new file mode 100755 index 0000000..b43d30d --- /dev/null +++ b/scripts/showcal.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +notify-send "$(printf "`cal -m`\n`cal -m +1month`")" \ No newline at end of file diff --git a/scripts/update.sh b/scripts/update.sh new file mode 100755 index 0000000..a4bdcbb --- /dev/null +++ b/scripts/update.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +#Detect the name of the display in use +display=":$(ls /tmp/.X11-unix/* | sed 's#/tmp/.X11-unix/X##' | head -n 1)" + +#Detect the user using such display +user="$(who | grep "tty1" | awk '{print $1}' | head -n 1)" + +#Detect the id of the user +uid="$(id -u $user)" + +pacman -Sy +sudo -u $user DISPLAY=$display DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$uid/bus notify-send -i "view-refresh" "Packages to update: $(pacman -Qqu | wc -l)" \ No newline at end of file diff --git a/scripts/xinit.sh b/scripts/xinit.sh index 323a7f4..bb65ce7 100755 --- a/scripts/xinit.sh +++ b/scripts/xinit.sh @@ -2,20 +2,18 @@ lxpolkit & slstatus & +fcitx5 & dunst & -setxkbmap -layout us,ru -option grp:alt_shift_toggle & -xbanish & xrdb ~/.Xresources & -wmname LG3D & feh --bg-fill ~/walls/current.png & -picom --experimental-backends & +picom & +amixer -c 1 sset 'Master' 0% +amixer -c 1 sset 'Speaker' 0% xautolock -time 5 -locker slock.sh & brightnessctl set 100% & wmname LG3D & emacs --daemon & -eval $(gnome-keyring-daemon --start) & +flameshot & +eval "$(gnome-keyring-daemon --start)" & export SSH_AUTH_SOCK & -#killall pulseaudio -~/scripts/start-jack.sh & -cadence & -mount ~/nextcloud & +easyeffects --gapplication-service & diff --git a/vim.jpg b/vim.jpg index 2ab1f72..b4e9d68 100644 Binary files a/vim.jpg and b/vim.jpg differ diff --git a/wall.kra b/wall.kra deleted file mode 100755 index af8bcb2..0000000 Binary files a/wall.kra and /dev/null differ