mirror of
https://github.com/elkowar/dots-of-war.git
synced 2024-12-26 14:12:23 +00:00
laptop stuff
This commit is contained in:
parent
b02bd70669
commit
5612bca527
6 changed files with 130 additions and 9 deletions
|
@ -3,7 +3,8 @@
|
|||
|
||||
(packer-use
|
||||
"/home/leon/coding/projects/nvim-gehzu" {}
|
||||
"/home/leon/coding/projects/yuck.vim" {}
|
||||
;"/home/leon/coding/projects/yuck.vim" {}
|
||||
:elkowar/yuck.vim {}
|
||||
:elkowar/antifennel-nvim {:config #(set vim.g.antifennel_executable "/home/leon/tmp/antifennel/antifennel")}
|
||||
:elkowar/kmonad.vim {}
|
||||
|
||||
|
@ -24,7 +25,7 @@
|
|||
(set vim.g.gruvbox_italicise_strings 0)
|
||||
(set vim.g.gruvbox_filetype_hi_groups 1)
|
||||
(set vim.g.gruvbox_plugin_hi_groups 1)
|
||||
(vim.cmd "colorscheme gruvbox8")
|
||||
(vim.cmd "colorscheme gruvbox8_hard")
|
||||
(req dots.utils.highlight :SignColumn {:bg (. (require :dots.colors) :dark0)}))}
|
||||
;(req dots.utils.highlight :LspDiagnosticsUnderlineError {:gui "underline"}))}
|
||||
|
||||
|
@ -113,10 +114,10 @@
|
|||
; code-related ----------------------------------------- <<<
|
||||
|
||||
:ray-x/lsp_signature.nvim {:events [:BufEnter]}
|
||||
"/home/leon/coding/prs/trouble.nvim" {:mod "dots.plugins.trouble"
|
||||
:cmd ["Trouble" "TroubleClose" "TroubleRefresh" "TroubleToggle"]}
|
||||
;:folke/lsp-trouble.nvim {:mod "dots.plugins.trouble"
|
||||
;"/home/leon/coding/prs/trouble.nvim" {:mod "dots.plugins.trouble"
|
||||
;:cmd ["Trouble" "TroubleClose" "TroubleRefresh" "TroubleToggle"]}
|
||||
:folke/lsp-trouble.nvim {:mod "dots.plugins.trouble"
|
||||
:cmd ["Trouble" "TroubleClose" "TroubleRefresh" "TroubleToggle"]}
|
||||
:simrat39/symbols-outline.nvim {:mod "dots.plugins.symbols-outline"}
|
||||
:neovim/nvim-lspconfig {}
|
||||
|
||||
|
|
|
@ -108,11 +108,10 @@
|
|||
:server {:on_attach on_attach
|
||||
:cmd ["/home/leon/coding/prs/rust-analyzer/target/release/rust-analyzer"]}}))
|
||||
|
||||
(let [sumneko_root_path (.. vim.env.HOME "/.local/share/lua-language-server")
|
||||
sumneko_binary (.. sumneko_root_path "/bin/Linux/lua-language-server")]
|
||||
(let [sumneko_binary "/usr/bin/lua-language-server"]
|
||||
(init-lsp
|
||||
:sumneko_lua
|
||||
{:cmd [sumneko_binary "-E" (.. sumneko_root_path "/main.lua")]
|
||||
{:cmd [sumneko_binary]
|
||||
:settings {:Lua {:runtime {:version "LuaJIT"
|
||||
:path (vim.split package.path ";")}
|
||||
:diagnostics {:globals ["vim"]}
|
||||
|
|
10
scripts/scripts/battery_indicator.sh
Executable file
10
scripts/scripts/battery_indicator.sh
Executable file
|
@ -0,0 +1,10 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
#output="$(upower -i /org/freedesktop/UPower/devices/battery_BAT1)"
|
||||
percentage="$(cat /sys/class/power_supply/BAT1/capacity)"
|
||||
status="$(cat /sys/class/power_supply/BAT1/status)"
|
||||
|
||||
|
||||
echo "${percentage}%"
|
||||
|
||||
|
40
zsh/.config/zsh/.zshrc
Normal file
40
zsh/.config/zsh/.zshrc
Normal file
|
@ -0,0 +1,40 @@
|
|||
source ~/.zplug/init.zsh
|
||||
|
||||
zplug 'zplug/zplug', hook-build:'zplug --self-manage'
|
||||
zplug "plugins/git", from:oh-my-zsh
|
||||
zplug "zsh-users/zsh-completions"
|
||||
zplug "Aloxaf/fzf-tab", defer:2
|
||||
zplug "zsh-users/zsh-history-substring-search", defer:2
|
||||
zplug "zdharma/fast-syntax-highlighting", defer:2
|
||||
|
||||
if ! zplug check --verbose; then
|
||||
printf "Install? [y/N]: "
|
||||
if read -q; then
|
||||
echo; zplug install
|
||||
fi
|
||||
fi
|
||||
zplug load
|
||||
|
||||
eval "$(zoxide init zsh)"
|
||||
|
||||
source "$ZDOTDIR/fzf-tab.zsh"
|
||||
|
||||
|
||||
setopt nobeep
|
||||
setopt HIST_IGNORE_ALL_DUPS
|
||||
autoload -Uz colors && colors
|
||||
autoload -Uz promptinit && promptinit
|
||||
|
||||
my-backward-delete-word() {
|
||||
local WORDCHARS=${WORDCHARS/\//}
|
||||
zle backward-delete-word
|
||||
}
|
||||
zle -N my-backward-delete-word
|
||||
bindkey '^W' my-backward-delete-word
|
||||
bindkey '^H' backward-delete-word
|
||||
|
||||
|
||||
alias ls="exa --icons"
|
||||
|
||||
|
||||
source "$ZDOTDIR/prompt.zsh"
|
23
zsh/.config/zsh/fzf-tab.zsh
Normal file
23
zsh/.config/zsh/fzf-tab.zsh
Normal file
|
@ -0,0 +1,23 @@
|
|||
#!/usr/bin/env zsh
|
||||
|
||||
FZF_TAB_COMMAND=(
|
||||
fzf
|
||||
--ansi
|
||||
--expect='$continuous_trigger' # For continuous completion
|
||||
'--color=hl:$(( $#headers == 0 ? 108 : 255 ))'
|
||||
--nth=2,3 --delimiter='\x00' # Don't search prefix
|
||||
--layout=reverse --height="''${FZF_TMUX_HEIGHT:=50%}"
|
||||
--tiebreak=begin -m --bind=tab:down,btab:up,change:top,ctrl-space:toggle --cycle
|
||||
'--query=$query' # $query will be expanded to query string at runtime.
|
||||
'--header-lines=$#headers' # $#headers will be expanded to lines of headers at runtime
|
||||
)
|
||||
zstyle ':fzf-tab:*' command $FZF_TAB_COMMAND
|
||||
zstyle ':completion:complete:*:options' sort false
|
||||
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
|
||||
zstyle ':fzf-tab:complete:_zlua:*' query-string input
|
||||
zstyle ':fzf-tab:complete:*:*' fzf-preview '/home/leon/scripts/preview.sh $realpath'
|
||||
|
||||
|
||||
|
||||
|
||||
|
48
zsh/.config/zsh/prompt.zsh
Normal file
48
zsh/.config/zsh/prompt.zsh
Normal file
|
@ -0,0 +1,48 @@
|
|||
#!/usr/bin/env zsh
|
||||
|
||||
local __bright_cyan="#8ec07c"
|
||||
local __bright_white="#ebdbb2"
|
||||
local __bright_green="#b8bb26"
|
||||
|
||||
dir() {
|
||||
local CUTOFF=3
|
||||
local IFS=/
|
||||
local my_path=($(print -P '%~'))
|
||||
local p
|
||||
for p in $my_path; do
|
||||
printf %s "${s}${p[0,$CUTOFF]}"
|
||||
local s=/
|
||||
done
|
||||
printf '%s\n' "${p:$CUTOFF}"
|
||||
}
|
||||
|
||||
|
||||
git_status() {
|
||||
local BRANCH=$(git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/*\s*\(.*\)/\1/')
|
||||
|
||||
if [ ! -z $BRANCH ]; then
|
||||
echo -n "(%F{$__bright_cyan}$BRANCH%F{$__bright_white}"
|
||||
[ ! -z "$(git status --short)" ] && echo -n "*"
|
||||
echo -n ")%f"
|
||||
fi
|
||||
}
|
||||
|
||||
function _my_prompt() {
|
||||
local exit_code="$?"
|
||||
echo -n "%F{$__bright_white}╭───"
|
||||
echo -n "%F{$__bright_cyan}$USER"
|
||||
echo -n "%F{$__bright_white} in"
|
||||
echo -n "%F{$__bright_green} $(dir)"
|
||||
echo -n "%F{$__bright_white} $(git_status)"
|
||||
if [ ! "$exit_code" = 0 ]; then
|
||||
echo -n "%F{red} REEEEEEEEEEE $exit_code"
|
||||
fi
|
||||
echo
|
||||
# %3{stuff%} tell's zsh that the characters are printed as 3 chars wide
|
||||
echo -n "%F{$__bright_white}%3{╰─λ%} "
|
||||
}
|
||||
|
||||
|
||||
setopt prompt_subst
|
||||
autoload -U colors && colors
|
||||
PS1='$(_my_prompt)'
|
Loading…
Reference in a new issue