From db7b2df76ece0104f75a9cdc20759c886b8d7cac Mon Sep 17 00:00:00 2001 From: Tony Blyler Date: Fri, 29 Oct 2021 10:41:50 -0400 Subject: [PATCH] Update notes to have category support, add background to i3, set gruvbox to high contrast mode for my colorblind self, set rofi theme to high contrast gruvbox too --- home/.config/i3/config | 2 ++ home/.config/nvim/init.vim | 2 ++ home/.config/rofi/config | 1 + home/.zshrc | 4 ++++ home/.zshrc.d/notes.sh | 22 ++++++++++++++++++++-- 5 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 home/.config/rofi/config diff --git a/home/.config/i3/config b/home/.config/i3/config index b5ab3c4..244eb6c 100644 --- a/home/.config/i3/config +++ b/home/.config/i3/config @@ -12,6 +12,8 @@ exec --no-startup-id blueman-applet # xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the # screen before suspend. Use loginctl lock-session to lock your screen. exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock -c 000000 --nofork +# background +exec --no-startup-id feh --bg-fill ~/bg.png set $mod Mod4 diff --git a/home/.config/nvim/init.vim b/home/.config/nvim/init.vim index 7df1b5b..a93363f 100644 --- a/home/.config/nvim/init.vim +++ b/home/.config/nvim/init.vim @@ -49,6 +49,8 @@ if executable('ag') let g:ackprg = 'ag --vimgrep' endif +let g:gruvbox_contrast_dark = 'hard' + set background=dark " make sure dark mode is used autocmd vimenter * ++nested colorscheme gruvbox " Color scheme set laststatus=2 " Enable airline diff --git a/home/.config/rofi/config b/home/.config/rofi/config new file mode 100644 index 0000000..01ecf55 --- /dev/null +++ b/home/.config/rofi/config @@ -0,0 +1 @@ +rofi.theme: /usr/share/rofi/themes/gruvbox-dark-hard.rasi diff --git a/home/.zshrc b/home/.zshrc index 64ae7b5..0292272 100644 --- a/home/.zshrc +++ b/home/.zshrc @@ -5,6 +5,10 @@ if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]] source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" fi +if [ -e /etc/profile.d/flatpak.sh ]; then + source /etc/profile.d/flatpak.sh +fi + if [ -f "${HOME}/.zshrc.d/init" ]; then source "${HOME}/.zshrc.d/init" fi diff --git a/home/.zshrc.d/notes.sh b/home/.zshrc.d/notes.sh index 095dcb8..f3fde76 100755 --- a/home/.zshrc.d/notes.sh +++ b/home/.zshrc.d/notes.sh @@ -1,7 +1,7 @@ #!/bin/bash notes() { - local -r NOTES_DIR="${NOTES_DIR:-${HOME}/notes}" + local NOTES_DIR="${NOTES_DIR:-${HOME}/notes}" local -r EDITOR="${EDITOR:-vim}" local EDITOR_OPTIONS=() @@ -20,6 +20,15 @@ notes() { cd "$NOTES_DIR" case "${ARG}" in + 'category') + shift + export NOTES_DIR="$NOTES_DIR/$1" + shift + + notes "$@" + exit 255 + ;; + 'fzf') "${EDITOR}" "${EDITOR_OPTIONS[@]}" "$(notes ls | fzf)" ;; @@ -50,7 +59,16 @@ notes() { exit 1 ;; esac - ) || return $? + ) + + local EXIT_CODE=$? + if [ $EXIT_CODE != 0 ]; then + if [ $EXIT_CODE = 255 ]; then + return 0 + fi + + return $EXIT_CODE + fi done # return if the above loop didn't return a bad code