Skip to content

Commit

Permalink
July 16 2022 (#94)
Browse files Browse the repository at this point in the history
  • Loading branch information
denisidoro authored Jul 16, 2022
1 parent 555255a commit 31e48ad
Show file tree
Hide file tree
Showing 124 changed files with 1,478 additions and 1,684 deletions.
18 changes: 2 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
<h3 align="center">
<span><img width="18" src="https://image.flaticon.com/icons/svg/226/226769.svg" alt="OSX - Icon made by Freepik from Flaticon" /></span>
<span><img width="18" src="https://image.flaticon.com/icons/svg/226/226772.svg" alt="Linux - Icon made by Freepik from Flaticon" /></span>
<span><img width="18" src="https://image.flaticon.com/icons/svg/174/174836.svg" alt="Android - Icon made by Freepik from Flaticon" /></span>
denisidoro/dotfiles
<a alt="CI status" href="https://github.com/denisidoro/dotfiles/actions"><img src="https://github.com/denisidoro/dotfiles/workflows/Tests/badge.svg" /></a>
<a alt="GitHub release" href="https://github.com/denisidoro/dotfiles/releases"><img src="https://img.shields.io/github/v/release/denisidoro/dotfiles?include_prereleases" /></a>
Expand All @@ -13,7 +10,7 @@
<sub>Awesome personal dotfiles</sub>
</p>
<p align="center">
<a href="#-installation">Installation</a>&nbsp;&nbsp;&nbsp;
<a href="#full-installation">Installation</a>&nbsp;&nbsp;&nbsp;
<a href="shell">Shell</a>&nbsp;&nbsp;&nbsp;
<a href="scripts">Scripts</a>&nbsp;&nbsp;&nbsp;
<a href="git/config">Git</a>&nbsp;&nbsp;&nbsp;
Expand Down Expand Up @@ -43,7 +40,7 @@ git clone https://github.com/denisidoro/dotfiles "$DOTFILES"

```bash
dot::clone() {
DOT_VERSION=master bash <(curl -s https://raw.githubusercontent.com/denisidoro/dotfiles/master/scripts/self/install)
bash <(curl -s https://raw.githubusercontent.com/denisidoro/dotfiles/master/scripts/self/install)
}

dot::clone_if_necessary() {
Expand Down Expand Up @@ -83,17 +80,6 @@ Benchmark #1: /usr/bin/time /bin/zsh -i -c exit
Range (min … max): 32.7 ms … 48.8 ms 67 runs
```

## Overriding configs

Edit the following files accordingly:
```bash
# shell
vi "${DOTFILES}/local/zshrc"

# git
vi "${DOTFILES}/local/gitconfig"
```

## Template

In order to setup your own dotfiles, I recommend using [dotly](https://github.com/CodelyTV/dotly) or [Sloth](https://github.com/gtrabanco/.Sloth), which are frameworks inpired by this repository.
5 changes: 3 additions & 2 deletions bin/dot
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@ _alias() {
bash|sh|shell|terminal|scripting) echo script ;;
fs) echo filesystem ;;
and) echo android ;;
cloud) echo storm ;;
clj) echo clojure ;;
game) echo gaming ;;
gaming) echo game ;;
environment|env) echo self ;;
net) echo network ;;
pkg) echo package ;;
Expand Down Expand Up @@ -98,7 +99,7 @@ elif [[ $# -eq 1 ]]; then

echo 'Commands:'
for cmd in $(find "${DOTFILES}/scripts/${context_query}/" -mindepth 1 -maxdepth 1 -executable -type f | awk -F"/" '{print $NF}'); do
printf " %-24s %s" "$cmd" "$("${DOTFILES}/scripts/${context_query}/${cmd}" --help | head -n1)"
printf " \033[34m%-24s\033[39m \033[37m%s\033[39m" "$cmd" "$("${DOTFILES}/scripts/${context_query}/${cmd}" --help | head -n1)"
echo
done
else
Expand Down
6 changes: 6 additions & 0 deletions bin/e
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash

dot_bin_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"

editors="/Applications/Visual Studio Code.app/Contents/Resources/app/bin/code,code,vscode,sublime,nvim,vim,vi,nano"
"${dot_bin_dir}/dot" terminal dashed "$editors" -- "$@"
1 change: 1 addition & 0 deletions bin/git-dot
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
set -euo pipefail

dot_bin_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"

"${dot_bin_dir}/dot" git "$@"
6 changes: 6 additions & 0 deletions bin/v
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash

dot_bin_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"

editors="nvim,vim,vi,nano"
"${dot_bin_dir}/dot" terminal dashed "$editors" -- "$@"
16 changes: 0 additions & 16 deletions browsers/vivaldi/common.css

This file was deleted.

7 changes: 7 additions & 0 deletions config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
pkg:
sudo:
apk: true

game:
cemu:
dir: /mnt/d/Emulators/Cemu
6 changes: 4 additions & 2 deletions editors/spacevim/spacevim.rc
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
let g:go_version_warning = 0

let g:spacevim_plug_home = '~/.vim/plugged'

" let g:spacevim_leader = "<\Space>"
Expand All @@ -22,7 +24,7 @@ function! UserInit()
Plug 'junegunn/seoul256.vim'
Plug 'airblade/vim-rooter'
Plug 'danilo-augusto/vim-afterglow'
Plug 'liuchengxu/space-vim-dark'
" Plug 'liuchengxu/space-vim-dark'
Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' }

endfunction
Expand All @@ -39,7 +41,7 @@ function! UserConfig()
if has('termguicolors')

" colorscheme afterglow
colorscheme space-vim-dark
" colorscheme space-vim-dark
hi Comment cterm=italic
hi Normal ctermbg=NONE guibg=NONE
hi LineNr ctermbg=NONE guibg=NONE
Expand Down
8 changes: 4 additions & 4 deletions editors/vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"terminal.integrated.rendererType": "dom",
// ==================
// Explorer
// ==================
// ==================
"explorer.confirmDragAndDrop": false,
"explorer.confirmDelete": false,
"files.exclude": {
Expand Down Expand Up @@ -93,11 +93,11 @@
// },
// ==================
// Rust
// ==================
// ==================
"rust-analyzer.checkOnSave.command": "clippy",
// ==================
// Javascript
// ==================
// ==================
"javascript.validate.enable": false,
"javascript.updateImportsOnFileMove.enabled": "always",
// ==================
Expand Down Expand Up @@ -230,4 +230,4 @@
"typescript.inlayHints.propertyDeclarationTypes.enabled": true,
"typescript.inlayHints.variableTypes.enabled": true,
"workbench.editor.enablePreviewFromCodeNavigation": true
}
}
2 changes: 1 addition & 1 deletion git/config
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
autoStash = true

[include]
path = ~/dotfiles/local/gitconfig
path = ~/dotfiles/local/mac/gitconfig

[pull]
rebase = true
Expand Down
2 changes: 1 addition & 1 deletion navi/cheats/android.cheat
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ $ ssh_config: echo "${PREFIX}/etc/ssh/sshd_config"
% android, apps

# Open Google Play Store profile page for an app
dot browser google-lucky "<query> site:play.google.com"
dot terminal open "https://duckduckgo.com/?q=%21+$(dot script eval --load str str::urlencode "<query> site:play.google.com")&ia=web"
2 changes: 1 addition & 1 deletion navi/cheats/editor.cheat
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
echo "<vscode_action>"

# Edit dotfiles in VSCode
dot terminal dashed dot code vscode -- "${DOTFILES}" &disown
e "${DOTFILES}" &disown

$ vscode_action: curl -sL "https://raw.githubusercontent.com/aburok/mysettings/master/VisualStudio/vscommands.txt"
2 changes: 1 addition & 1 deletion navi/cheats/filesystem.cheat
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ find -L . -name . -o -type d -prune -o -type l -exec rm {} +
du -sh

# Edit fre entries
dot code vscode "${HOME}/Library/Application Support/fre/fre.json"
e "${HOME}/Library/Application Support/fre/fre.json"

# Resize pngs to 128x128
\ls ./*[^(_128)].png | sed 's/.png//' | xargs -I% convert "%.png" -resize 128x128 "%_128.png"
17 changes: 17 additions & 0 deletions navi/cheats/tmp.cheat
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
% examples
# Display contents of a file
cat <file>

# Echo text
echo <some_text>

$file: ls


% tmp

# Echo multiline
Expand Down Expand Up @@ -61,6 +71,13 @@ $ log: echo "foo bar"
$ words: echo "$log" | wc -w | xargs


% empty

# empty test
tar -xf <file>

$ file: ls *.tar

% default

# default test
Expand Down
2 changes: 1 addition & 1 deletion raycast/navi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# @raycast.mode silent

# Optional parameters:
# @raycast.icon /Users/denis.isidoro/Pictures/Icons/navi_128.png
# @raycast.icon /Users/denis.isidoro/Pictures/Icons/navi_64sq.png
# @raycast.packageName Browser

# Documentation:
Expand Down
19 changes: 18 additions & 1 deletion repos/dotlink/set.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@ dot_set() {
local dotset_backup=false
local dotset_verbose=false

# TODO: understand why doset_backup=true is necessary here
for arg in "$@"; do
shift
case "$arg" in
"--ignore" ) set -- "$@" "-i" ;;
"--force" ) set -- "$@" "-f" ;;
"--create-dirs"|"p" ) dotset_create_dirs=true ;;
"--backup" ) set -- "$@" "-b" ;;
"--backup" ) dotset_backup=true; set -- "$@" "-b" ;;
"--verbose") set -- "$@" "-v" ;;
*) set -- "$@" "$arg" ;;
esac
Expand All @@ -32,6 +33,12 @@ dot_set() {
esac
done

# echo "args: $*" >&2
# echo "dotset_ignore: ${dotset_ignore:-}" >&2
# echo "dotset_force: ${dotset_force:-}" >&2
# echo "dotset_backup: ${dotset_backup:-}" >&2
# echo "dotset_verbose: ${dotset_verbose:-}" >&2

check_dir() { #{{{
local orig="$1"

Expand Down Expand Up @@ -160,6 +167,16 @@ dot_set() {
dotfile="$1"
orig="$2"

if [ -n "${DOTLINK_IGNORE_LIST:-}" ]; then
IFS=',' read -r -a ignores <<< "$DOTLINK_IGNORE_LIST"
for ignore in "${ignores[@]}"; do
if [[ "$dotfile" = *"$ignore"* ]]; then
echo "IGNORING ${dotfile} because it matches ${ignore}!"
return 0
fi
done
fi

# if dotfile doesn't exist, print error message and pass
if [ ! -e "${dotfile}" ]; then
echo "$(prmpt 1 "not found")${dotfile}"
Expand Down
50 changes: 0 additions & 50 deletions repos/jira-epic/index.js

This file was deleted.

1 change: 0 additions & 1 deletion repos/tasker-js/.gitignore

This file was deleted.

9 changes: 0 additions & 9 deletions repos/tasker-js/Makefile

This file was deleted.

13 changes: 0 additions & 13 deletions repos/tasker-js/babel.config.json

This file was deleted.

Loading

0 comments on commit 31e48ad

Please sign in to comment.