这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions bash/aliases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ DESKTOP="/mnt/c/Users/guilh/Desktop"
alias desktop="cd $DESKTOP"
alias rmidn="rm -r **/*:Zone.Identifier && rm -R **/.*:Zone.Identifier"
alias sb="source ~/.bashrc"
alias fixtime="sudo ntpdate time.windows.com"

# Vim
alias vi="vim"
Expand Down
9 changes: 9 additions & 0 deletions fonts/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
![SF Mono Powerline](Prompt.png)

### Apple's gorgeous SF Mono font patched with [the Nerd Fonts patcher](https://github.com/ryanoasis/nerd-fonts#font-patcher) for Powerline support.

Powerline glyphs allow for pretty and practical statuslines, as seen in [the original vim plugin](https://github.com/powerline/powerline) or in enhanced shell prompts like [Shellder](https://github.com/simnalamburt/shellder) (shown above) or [Starship](https://starship.rs).

Supported for macOS, Linux and Windows.

For personal use only.
Binary file added fonts/SF-Mono-Powerline-Bold-Italic.otf
Binary file not shown.
Binary file added fonts/SF-Mono-Powerline-Bold.otf
Binary file not shown.
Binary file added fonts/SF-Mono-Powerline-Heavy-Italic.otf
Binary file not shown.
Binary file added fonts/SF-Mono-Powerline-Heavy.otf
Binary file not shown.
Binary file added fonts/SF-Mono-Powerline-Light-Italic.otf
Binary file not shown.
Binary file added fonts/SF-Mono-Powerline-Light.otf
Binary file not shown.
Binary file added fonts/SF-Mono-Powerline-Medium-Italic.otf
Binary file not shown.
Binary file added fonts/SF-Mono-Powerline-Medium.otf
Binary file not shown.
Binary file added fonts/SF-Mono-Powerline-Regular-Italic.otf
Binary file not shown.
Binary file added fonts/SF-Mono-Powerline-Regular.otf
Binary file not shown.
Binary file added fonts/SF-Mono-Powerline-Semibold-Italic.otf
Binary file not shown.
Binary file added fonts/SF-Mono-Powerline-Semibold.otf
Binary file not shown.
3 changes: 2 additions & 1 deletion scripts/mp3
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
# usage: mp3 <name> (without extension)

filename=$(echo "$1" | cut -f 1 -d '.')
ffmpeg -v 5 -y -i $filename.m4a -acodec libmp3lame -ac 2 -ab 192k $filename.mp3 && rm $filename.m4a
ffmpeg -v 5 -y -i "${filename}.m4a" -acodec libmp3lame -ac 2 -ab 192k
"${filename}.mp3" && rm "${filename}.m4a"
2 changes: 1 addition & 1 deletion scripts/workspace
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh

[ -h "$MARKPATH/$1" ] && exec code $(readlink "${MARKPATH}/${1}") ||
echo "workspace not found"
echo "workspace not found."
111 changes: 111 additions & 0 deletions scripts/zet
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
#!/bin/sh

# Zettelkasten + FZF
#
# 1. Automatic Note Creation w/ isotime
# 2. Link notes
# 3. Add tags to notes
# 4. Automatic github Sync

# The query command will depend on fzf. You can use a filter to exclude &
# include zettels by tags.

# Commands
# new | n -> create a new note on inbox/
# query | q -> find notes w/ regex
# link | l -> link 2 zettels together ?
# rm-link | rml -> remove
# ls -> list all notes ?

ZETTELKASTEN="${HOME}/zet"
INBOX="${ZETTELKASTEN}/inbox"

print_help() {
printf "%s
Zettelkasten program
It is organized by inbox & permanent notes.

Commands:
--help | -h Show help commands
new | n Create a new note
link | l Link two notes
rm-link | rml Remove two links
hub | h Opens the hub zettel
query | q Queries the zettels with Regex, you can filter by tags.
"
}

# Zettelkasten new note template
zet_new() {
local fileName=$(isosec)
local file="${fileName}.md"

tee "${INBOX}/${file}" <<EOF >/dev/null
**links:**
**tags:**

# Add a title

EOF
}

zet_link() {
local file1Basename=$(basename -s '.md' $2)
local file2Basename=$(basename -s '.md' $3)

local file1="[${file1Basename}](${file1Basename})"
local file2="[${file2Basename}](${file2Basename})"

local existsLinkOnFile1=$(cat $2 | grep -c "$file2Basename")
local existsLinkOnFile2=$(cat $3 | grep -c "$file1Basename")

# Check if file1 has a link of file2
if [ $existsLinkOnFile1 -eq 1 ]; then
printf "$file1Basename already is linked to $file2Basename\n"
if [ $existsLinkOnFile2 -eq 0 ]; then
read -p "$file2Basename does not contain a link back, do you want to fix? [Y/y]" yes
case "${yes}" in
y | Y)
# Append link on the file 2
sed -i "1s/$/ ${file1}/" $3
;;
esac
fi
exit 0
fi

# Check if file2 has a link of file1
if [ $existsLinkOnFile2 -eq 1 ]; then
printf "$file2Basename already is linked to $file1Basename\n"
if [ $existsLinkOnFile1 -eq 0 ]; then
read -p "$file1Basename does not contain a link back, do you want to fix? [Y/y]" yes
case "${yes}" in
y | Y)
# Append link on the file 1
sed -i "1s/$/ ${file2}/" $2
;;
esac
fi
exit 0
fi

# Link both files
sed -i "1s/$/ ${file1}/" $3
sed -i "1s/$/ ${file2}/" $2
}

case $1 in
-h | --help)
print_help
exit 0
;;
n | new)
zet_new
exit 0
;;
l | link)
exit 0
;;
esac

print_help
23 changes: 3 additions & 20 deletions vim/vimrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
let mapleader = ","

set spelllang=en_us

set autoindent " automatically indent new lines
set autowrite " automatically write files when changing when multiple files open
set nonumber " activate line numbers
Expand Down Expand Up @@ -96,7 +98,7 @@ Plug 'tpope/vim-commentary'
Plug 'junegunn/goyo.vim'
Plug 'vitalk/vim-simple-todo' " TODO: Create your own plugin
Plug 'roxma/vim-tmux-clipboard'
Plug 'skywind3000/asyncrun.vim'
Plug 'neoclide/coc.nvim', {'branch': 'master', 'do': 'yarn install --frozen-lockfile'}

call plug#end()

Expand All @@ -115,25 +117,6 @@ let g:gruvbox_italic=1
let g:shfmt_fmt_on_save = 1
let g:shfmt_extra_args = '-i 2' " spaces

" Asyncrun
"
" https://github.com/skywind3000/asyncrun.vim
"
let g:asyncrun_status = ''
" let g:asyncrun_shell = '/bin/bash'
let g:airline_section_error = airline#section#create_right(['%{g:asyncrun_status}'])

" toggle asyncrun panel
noremap <F9> :call asyncrun#quickfix_toggle(8)<cr>

" Linters
"
" Example to spawn a terminal:
" au FileType sh autocmd BufWritePost * :AsyncRun -mode=term -pos=bottom -rows=10 shellcheck "$(VIM_FILEPATH)"
"
" POSIX linter
au FileType sh autocmd BufWritePost * :AsyncRun shellcheck %

" Vim Markdown
"
" https://github.com/plasticboy/vim-markdown
Expand Down