aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.config/nvim/color-tweaks.vim38
-rw-r--r--.config/nvim/init.vim46
-rw-r--r--.config/nvim/mode.vim16
-rw-r--r--.config/yadm/packages-arch1
-rwxr-xr-x.config/yadm/root/bootstrap20
-rwxr-xr-x.local/share/bin/mode70
-rw-r--r--.local/share/oh-my-zsh/themes/loek.zsh-theme25
7 files changed, 145 insertions, 71 deletions
diff --git a/.config/nvim/color-tweaks.vim b/.config/nvim/color-tweaks.vim
new file mode 100644
index 0000000..b59a67e
--- /dev/null
+++ b/.config/nvim/color-tweaks.vim
@@ -0,0 +1,38 @@
+" vim sneak labels
+hi! link CocFloating SneakScope
+
+" change default vim-sneak colors to be more readable
+hi! SneakLabel gui=reverse
+hi! SneakLabelMask gui=reverse
+
+" fix terminal color
+hi! link TermCursor Cursor
+hi! link TermCursorNC Cursor
+
+" fix which key color
+hi! link WhichKeyFloating NormalFloat
+
+" line numbers / gutter colors
+hi! SignColumn guibg=NONE ctermbg=NONE
+hi GitGutterAdd guibg=NONE
+hi GitGutterChange guibg=NONE
+hi GitGutterDelete guibg=NONE
+hi GitGutterAddIntraLine guibg=NONE
+hi GitGutterAddInvisible guibg=NONE
+hi GitGutterChangeDelete guibg=NONE
+hi GitGutterChangeInvisible guibg=NONE
+hi GitGutterDeleteIntraLine guibg=NONE
+hi GitGutterDeleteInvisible guibg=NONE
+hi CocErrorSign guibg=NONE
+hi CocGitAddedSign guibg=NONE
+hi CocGitChangeRemovedSign guibg=NONE
+hi CocGitChangedSign guibg=NONE
+hi CocGitRemovedSign guibg=NONE
+hi CocGitTopRemovedSign guibg=NONE
+hi CocHintSign guibg=NONE
+hi CocInfoSign guibg=NONE
+hi CocWarningSign guibg=NONE
+
+" fix disappearing CocFadeOut
+hi! link Conceal Comment
+
diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim
index 4fa1894..51cd22d 100644
--- a/.config/nvim/init.vim
+++ b/.config/nvim/init.vim
@@ -26,7 +26,6 @@ let g:minimap_highlight='Visual'
let g:python3_host_prog='/usr/bin/python3'
let g:vimtex_quickfix_open_on_warning = 0
let g:vimtex_imaps_enabled = 0
-hi! link CocFloating SneakScope
if exists("g:neovide")
nmap <silent> <C-=> :lua vim.g.neovide_scale_factor = vim.g.neovide_scale_factor + 0.1<CR>
@@ -230,25 +229,6 @@ let g:Hexokinase_optInPatterns = [
\ 'hsla'
\ ]
-" colorscheme thingers
-if filereadable(expand('~/.local/share/mode/light'))
- colorscheme github-light
-else
- colorscheme ghdark
-endif
-
-" change default vim-sneak colors to be more readable
-hi! SneakLabel gui=reverse
-hi! SneakLabelMask gui=reverse
-
-" fix terminal color
-hi! link TermCursor Cursor
-hi! link TermCursorNC Cursor
-
-" fix which key color
-hi! link WhichKeyFloating NormalFloat
-
-source $HOME/.config/nvim/lightline.vim
let g:lightline = {
\ 'colorscheme': 'auto',
\ 'mode_map': {
@@ -283,28 +263,7 @@ let g:lightline = {
let g:lightline.tabline = {
\ 'left': [ [ 'tabs' ] ],
\ 'right': [ ] }
-hi! SignColumn guibg=NONE ctermbg=NONE
-hi GitGutterAdd guibg=NONE
-hi GitGutterChange guibg=NONE
-hi GitGutterDelete guibg=NONE
-hi GitGutterAddIntraLine guibg=NONE
-hi GitGutterAddInvisible guibg=NONE
-hi GitGutterChangeDelete guibg=NONE
-hi GitGutterChangeInvisible guibg=NONE
-hi GitGutterDeleteIntraLine guibg=NONE
-hi GitGutterDeleteInvisible guibg=NONE
-hi CocErrorSign guibg=NONE
-hi CocGitAddedSign guibg=NONE
-hi CocGitChangeRemovedSign guibg=NONE
-hi CocGitChangedSign guibg=NONE
-hi CocGitRemovedSign guibg=NONE
-hi CocGitTopRemovedSign guibg=NONE
-hi CocHintSign guibg=NONE
-hi CocInfoSign guibg=NONE
-hi CocWarningSign guibg=NONE
-
-" fix disappearing CocFadeOut
-hi! link Conceal Comment
+call lightline#init()
" vimtex config
let g:tex_flavor = 'latex'
@@ -426,3 +385,6 @@ let g:sneak#use_ic_scs = 0
autocmd InsertEnter * call system("fcitx5-temp-restore &")
autocmd InsertLeave * call system("fcitx5-temp-off &")
+" colorscheme
+source $XDG_CONFIG_HOME/nvim/mode.vim
+
diff --git a/.config/nvim/mode.vim b/.config/nvim/mode.vim
new file mode 100644
index 0000000..3ab04cb
--- /dev/null
+++ b/.config/nvim/mode.vim
@@ -0,0 +1,16 @@
+" this file should only contain colorscheme information, and sourcing it
+" should cause colors set by `mode` to update in an existing neovim session
+
+if filereadable(expand("$XDG_DATA_HOME/mode/light"))
+ colorscheme github-light
+else
+ colorscheme ghdark
+endif
+
+source $XDG_CONFIG_HOME/nvim/termcolors.vim
+
+source $XDG_CONFIG_HOME/nvim/lightline.vim
+call lightline#colorscheme()
+
+source $XDG_CONFIG_HOME/nvim/color-tweaks.vim
+
diff --git a/.config/yadm/packages-arch b/.config/yadm/packages-arch
index 35729df..7c36655 100644
--- a/.config/yadm/packages-arch
+++ b/.config/yadm/packages-arch
@@ -24,6 +24,7 @@ jq
libpulse # for pactl
maim
mpd
+neovim-remote
nicotine+
picom
pipewire
diff --git a/.config/yadm/root/bootstrap b/.config/yadm/root/bootstrap
index 19e5148..b244471 100755
--- a/.config/yadm/root/bootstrap
+++ b/.config/yadm/root/bootstrap
@@ -28,9 +28,12 @@ begintask "copy system config files"
s cp -r etc/. /etc
endtask
-begintask "set pinentry program to pinentry-gnome3 (GTK 3)"
-s ln -sf pinentry-gnome3 "$(command -v pinentry)"
-endtask
+PINENTRY="pinentry-gnome3"
+[ "$(command -v pinentry | xargs realpath | xargs basename)" != "$PINENTRY" ] && (
+ begintask "set pinentry program to $PINENTRY"
+ s ln -sf "$PINENTRY" "$(command -v pinentry)"
+ endtask
+)
begintask "enabling services"
s systemctl enable bluetooth ntpd cups
@@ -69,3 +72,14 @@ s grep '^#\s*\<Color\>' /etc/pacman.conf && (
endtask
)
+[ "$(getent passwd "$SETUP_USER" | cut -d: -f7 | xargs basename)" != "zsh" ] && (
+ begintask "set user shell to zsh"
+ s chsh -s "$(command -v zsh)" "$SETUP_USER"
+ endtask
+)
+
+cat << EOF
+
+root bootstrap finished in $(finishtime)!
+
+EOF
diff --git a/.local/share/bin/mode b/.local/share/bin/mode
index ef26a96..63ad51a 100755
--- a/.local/share/bin/mode
+++ b/.local/share/bin/mode
@@ -33,11 +33,11 @@ switch_xrdb() {
switch_dunst() {
cat "$XDG_CONFIG_HOME/dunst/base" - << EOF > "$XDG_CONFIG_HOME/dunst/dunstrc"
-frame_color = "$(get_color color1)"
+frame_color = "$(get_color color0)"
[urgency_low]
background = "$(get_color background)"
-foreground = "$(get_color color1)"
+foreground = "$(get_color foreground)"
timeout = 10
[urgency_normal]
@@ -97,7 +97,7 @@ switch_gtk() {
}
switch_fcitx5() {
- accent="$(get_color color9)"
+ accent="$(get_color color0)"
cat "$XDG_DATA_HOME/fcitx5/themes/loek/base.conf" - << EOF > "$XDG_DATA_HOME/fcitx5/themes/loek/theme.conf"
[InputPanel]
NormalColor=$(get_color foreground)
@@ -193,6 +193,27 @@ let s:test = [ '#ff00ff', 'NONE' ]
EOF
}
+switch_vim_terminal() {
+ cat << EOF > "$XDG_CONFIG_HOME/nvim/termcolors.vim"
+let g:terminal_color_0 = '$(get_color color0)'
+let g:terminal_color_1 = '$(get_color color1)'
+let g:terminal_color_2 = '$(get_color color2)'
+let g:terminal_color_3 = '$(get_color color3)'
+let g:terminal_color_4 = '$(get_color color4)'
+let g:terminal_color_5 = '$(get_color color5)'
+let g:terminal_color_6 = '$(get_color color6)'
+let g:terminal_color_7 = '$(get_color color7)'
+let g:terminal_color_8 = '$(get_color color8)'
+let g:terminal_color_9 = '$(get_color color9)'
+let g:terminal_color_10 = '$(get_color color10)'
+let g:terminal_color_11 = '$(get_color color11)'
+let g:terminal_color_12 = '$(get_color color12)'
+let g:terminal_color_13 = '$(get_color color13)'
+let g:terminal_color_14 = '$(get_color color14)'
+let g:terminal_color_15 = '$(get_color color15)'
+EOF
+}
+
switch_discord() {
cat << EOF > "$XDG_CONFIG_HOME/BetterDiscord/themes/mode.theme.css"
/**
@@ -279,23 +300,35 @@ reload_gtk() {
)
}
+reload_nvim() {
+ nvr --serverlist | while read -r nvim_socket ; do
+ fork nvr --nostart --servername "$nvim_socket" -c 'source $XDG_CONFIG_HOME/nvim/mode.vim'
+ done
+}
+
switch_cfgs() {
echo "switching to $1 mode..."
+ # xrdb needs to complete first, as the rest of the color schemes are derived
+ # from querying xrdb for colors
switch_xrdb $1
- switch_dunst $1
- switch_zathura $1
- switch_gtk $1
- switch_fcitx5 $1
- switch_chrome $1
- switch_polybar $1
- switch_vim_lightline $1
- switch_discord $1
+
+ switch_dunst $1 &
+ switch_zathura $1 &
+ switch_gtk $1 &
+ switch_fcitx5 $1 &
+ switch_chrome $1 &
+ switch_polybar $1 &
+ switch_vim_lightline $1 &
+ switch_discord $1 &
+ switch_vim_terminal $1 &
mkdir -p "$XDG_DATA_HOME/mode"
echo $1 > "$XDG_DATA_HOME/mode/active"
rm -f "$XDG_DATA_HOME/mode/dark" "$XDG_DATA_HOME/mode/light"
touch "$XDG_DATA_HOME/mode/$1"
+
+ wait $(jobs -rp)
}
[ $MODE = "restore" ] && MODE="$(cat "$XDG_DATA_HOME/mode/active")"
@@ -304,12 +337,15 @@ switch_cfgs() {
reload_apps() {
echo "reloading programs..."
- reload_polybar
- reload_dunst
- reload_terms
- reload_fcitx5
- reload_gtk
- rwall
+ reload_polybar &
+ reload_dunst &
+ reload_terms &
+ reload_fcitx5 &
+ reload_gtk &
+ reload_nvim &
+ rwall &
+
+ wait $(jobs -rp)
}
reload_apps
diff --git a/.local/share/oh-my-zsh/themes/loek.zsh-theme b/.local/share/oh-my-zsh/themes/loek.zsh-theme
index e8b1438..a126a10 100644
--- a/.local/share/oh-my-zsh/themes/loek.zsh-theme
+++ b/.local/share/oh-my-zsh/themes/loek.zsh-theme
@@ -1,12 +1,19 @@
-USER=""
-if [[ "$USER" != "$DEFAULT_USER" || -n "$SSH_CLIENT" ]]; then
- USER=" %m"
-fi
+INFO_COLOR=$'%{\e[90m%}' # bright gray
+SEPARATOR_COLOR=$'%{\e[30m%}' # normal gray
+RESET_COLOR=$'%{\e[0m%}'
-PROMPT='%{$fg[yellow]%}λ$USER %{$fg[green]%}%c %{$fg[yellow]%}-> $(git_prompt_info)$(hg_prompt_info)%{$reset_color%}'
+SEPARATOR="$SEPARATOR_COLOR -> "
-ZSH_THEME_GIT_PROMPT_PREFIX="λ %{$fg[blue]%}git %{$fg[red]%}"
-ZSH_THEME_GIT_PROMPT_SUFFIX="%{$fg[yellow]%} -> %{$reset_color%}"
-ZSH_THEME_HG_PROMPT_PREFIX="λ %{$fg[blue]%}hg %{$fg[red]%}"
-ZSH_THEME_HG_PROMPT_SUFFIX="%{$fg[yellow]%} -> %{$reset_color%}"
+PROMPT=""
+# only display hostname in prompt if connected over SSH
+[ -n "$SSH_CLIENT" ] && PROMPT+="$INFO_COLOR%m$SEPARATOR"
+PROMPT+="$INFO_COLOR%c$SEPARATOR" # working directory
+PROMPT+="$INFO_COLOR\$(git_prompt_info)\$(hg_prompt_info)" # git info (if in repo)
+PROMPT+="$RESET_COLOR"
+ZSH_THEME_GIT_PROMPT_PREFIX="${INFO_COLOR}git "
+ZSH_THEME_HG_PROMPT_PREFIX="${INFO_COLOR}hg "
+ZSH_THEME_GIT_PROMPT_SUFFIX="$SEPARATOR"
+ZSH_THEME_HG_PROMPT_SUFFIX="$SEPARATOR"
+
+# vim:ft=zsh