mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-02-01 22:47:48 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d8292ca033 | |||
| e929b85669 | |||
| 775d2abf13 | |||
| 740ad17207 |
@@ -7,3 +7,7 @@ indent_size = 2
|
|||||||
indent_style = space
|
indent_style = space
|
||||||
insert_final_newline = true
|
insert_final_newline = true
|
||||||
trim_trailing_whitespace = true
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
|
[.git{ignore,modules}]
|
||||||
|
indent_style = tab
|
||||||
|
indent_size = 1
|
||||||
|
|||||||
7
.gitmodules
vendored
7
.gitmodules
vendored
@@ -1,3 +1,4 @@
|
|||||||
|
# vim: set expandtab:
|
||||||
[submodule "dotbot"]
|
[submodule "dotbot"]
|
||||||
path = dotbot
|
path = dotbot
|
||||||
url = https://github.com/anishathalye/dotbot.git
|
url = https://github.com/anishathalye/dotbot.git
|
||||||
@@ -26,3 +27,9 @@
|
|||||||
update = rebase
|
update = rebase
|
||||||
branch = main
|
branch = main
|
||||||
ignore = dirty
|
ignore = dirty
|
||||||
|
|
||||||
|
[submodule "cheat-community"]
|
||||||
|
path = config/cheat/cheatsheets/community
|
||||||
|
url = https://github.com/cheat/cheatsheets.git
|
||||||
|
ignore = dirty
|
||||||
|
|
||||||
|
|||||||
2
.yamlignore
Normal file
2
.yamlignore
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
# .yamlignore
|
||||||
|
|
||||||
12
Brewfile
12
Brewfile
@@ -69,10 +69,14 @@ brew "eg-examples"
|
|||||||
brew "faas-cli"
|
brew "faas-cli"
|
||||||
# Simple, fast and user-friendly alternative to find
|
# Simple, fast and user-friendly alternative to find
|
||||||
brew "fd"
|
brew "fd"
|
||||||
|
# Banner-like program prints strings as ASCII art
|
||||||
|
brew "figlet"
|
||||||
# Libraries to talk to Microsoft SQL Server and Sybase databases
|
# Libraries to talk to Microsoft SQL Server and Sybase databases
|
||||||
brew "freetds"
|
brew "freetds"
|
||||||
# Monitor a directory for changes and run a shell command
|
# Monitor a directory for changes and run a shell command
|
||||||
brew "fswatch"
|
brew "fswatch"
|
||||||
|
# Command-line fuzzy finder written in Go
|
||||||
|
brew "fzf"
|
||||||
# Disk usage analyzer with console interface written in Go
|
# Disk usage analyzer with console interface written in Go
|
||||||
brew "gdu", link: false
|
brew "gdu", link: false
|
||||||
# GitHub command-line tool
|
# GitHub command-line tool
|
||||||
@@ -129,6 +133,8 @@ brew "lazydocker"
|
|||||||
brew "libpq"
|
brew "libpq"
|
||||||
# Linguistic software and Finnish dictionary
|
# Linguistic software and Finnish dictionary
|
||||||
brew "libvoikko"
|
brew "libvoikko"
|
||||||
|
# Rainbows and unicorns in your console!
|
||||||
|
brew "lolcat"
|
||||||
# Package manager for the Lua programming language
|
# Package manager for the Lua programming language
|
||||||
brew "luarocks"
|
brew "luarocks"
|
||||||
# Swiss Army Knife for macOS
|
# Swiss Army Knife for macOS
|
||||||
@@ -155,6 +161,8 @@ brew "pandoc"
|
|||||||
brew "perl"
|
brew "perl"
|
||||||
# General-purpose scripting language
|
# General-purpose scripting language
|
||||||
brew "php@8.1"
|
brew "php@8.1"
|
||||||
|
# Simple Python style checker in one Python file
|
||||||
|
brew "pycodestyle"
|
||||||
# Python version management
|
# Python version management
|
||||||
brew "pyenv"
|
brew "pyenv"
|
||||||
# Migrate pip packages from one Python version to another
|
# Migrate pip packages from one Python version to another
|
||||||
@@ -213,6 +221,8 @@ brew "watch"
|
|||||||
brew "wget"
|
brew "wget"
|
||||||
# Personal information dashboard for your terminal
|
# Personal information dashboard for your terminal
|
||||||
brew "wtfutil"
|
brew "wtfutil"
|
||||||
|
# Check your $HOME for unwanted files and directories
|
||||||
|
brew "xdg-ninja"
|
||||||
# JavaScript package manager
|
# JavaScript package manager
|
||||||
brew "yarn"
|
brew "yarn"
|
||||||
# A vulnerability scanner for container images and filesystems
|
# A vulnerability scanner for container images and filesystems
|
||||||
@@ -291,6 +301,8 @@ cask "quicklook-json"
|
|||||||
cask "quicklookase"
|
cask "quicklookase"
|
||||||
# Automatically hides or quits apps after periods of inactivity
|
# Automatically hides or quits apps after periods of inactivity
|
||||||
cask "quitter"
|
cask "quitter"
|
||||||
|
# Control your tools with a few keystrokes
|
||||||
|
cask "raycast"
|
||||||
# Move and resize windows using keyboard shortcuts or snap areas
|
# Move and resize windows using keyboard shortcuts or snap areas
|
||||||
cask "rectangle"
|
cask "rectangle"
|
||||||
# MySQL/MariaDB database management
|
# MySQL/MariaDB database management
|
||||||
|
|||||||
1
add-submodules.sh
Normal file → Executable file
1
add-submodules.sh
Normal file → Executable file
@@ -2,3 +2,4 @@
|
|||||||
|
|
||||||
git submodule add --name dotbot-brew -f https://github.com/wren/dotbot-brew.git dotbot-brew
|
git submodule add --name dotbot-brew -f https://github.com/wren/dotbot-brew.git dotbot-brew
|
||||||
git submodule add --name dotbot-include -f https://gitlab.com/gnfzdz/dotbot-include.git dotbot-include
|
git submodule add --name dotbot-include -f https://gitlab.com/gnfzdz/dotbot-include.git dotbot-include
|
||||||
|
git submodule add --name cheat-community -f https://github.com/cheat/cheatsheets.git config/cheat/cheatsheets/community
|
||||||
|
|||||||
1
config/cheat/cheatsheets/community
Submodule
1
config/cheat/cheatsheets/community
Submodule
Submodule config/cheat/cheatsheets/community added at 36bdb99dcf
0
config/cheat/cheatsheets/personal/.gitkeep
Normal file
0
config/cheat/cheatsheets/personal/.gitkeep
Normal file
84
config/cheat/conf.yml
Normal file
84
config/cheat/conf.yml
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
---
|
||||||
|
# The editor to use with 'cheat -e <sheet>'. Defaults to $EDITOR or $VISUAL.
|
||||||
|
editor: $EDITOR
|
||||||
|
|
||||||
|
# Should 'cheat' always colorize output?
|
||||||
|
colorize: true
|
||||||
|
|
||||||
|
# Which 'chroma' colorscheme should be applied to the output?
|
||||||
|
# Options are available here:
|
||||||
|
# https://github.com/alecthomas/chroma/tree/master/styles
|
||||||
|
style: monokai
|
||||||
|
|
||||||
|
# Which 'chroma' "formatter" should be applied?
|
||||||
|
# One of: "terminal", "terminal256", "terminal16m"
|
||||||
|
formatter: terminal256
|
||||||
|
|
||||||
|
# Through which pager should output be piped?
|
||||||
|
# 'less -FRX' is recommended on Unix systems
|
||||||
|
# 'more' is recommended on Windows
|
||||||
|
pager: less -FRX
|
||||||
|
|
||||||
|
# Cheatpaths are paths at which cheatsheets are available on your local
|
||||||
|
# filesystem.
|
||||||
|
#
|
||||||
|
# It is useful to sort cheatsheets into different cheatpaths for organizational
|
||||||
|
# purposes. For example, you might want one cheatpath for community
|
||||||
|
# cheatsheets, one for personal cheatsheets, one for cheatsheets pertaining to
|
||||||
|
# your day job, one for code snippets, etc.
|
||||||
|
#
|
||||||
|
# Cheatpaths are scoped, such that more "local" cheatpaths take priority over
|
||||||
|
# more "global" cheatpaths. (The most global cheatpath is listed first in this
|
||||||
|
# file; the most local is listed last.) For example, if there is a 'tar'
|
||||||
|
# cheatsheet on both global and local paths, you'll be presented with the local
|
||||||
|
# one by default. ('cheat -p' can be used to view cheatsheets from alternative
|
||||||
|
# cheatpaths.)
|
||||||
|
#
|
||||||
|
# Cheatpaths can also be tagged as "read only". This instructs cheat not to
|
||||||
|
# automatically create cheatsheets on a read-only cheatpath. Instead, when you
|
||||||
|
# would like to edit a read-only cheatsheet using 'cheat -e', cheat will
|
||||||
|
# perform a copy-on-write of that cheatsheet from a read-only cheatpath to a
|
||||||
|
# writeable cheatpath.
|
||||||
|
#
|
||||||
|
# This is very useful when you would like to maintain, for example, a
|
||||||
|
# "pristine" repository of community cheatsheets on one cheatpath, and an
|
||||||
|
# editable personal reponsity of cheatsheets on another cheatpath.
|
||||||
|
#
|
||||||
|
# Cheatpaths can be also configured to automatically apply tags to cheatsheets
|
||||||
|
# on certain paths, which can be useful for querying purposes.
|
||||||
|
# Example: 'cheat -t work jenkins'.
|
||||||
|
#
|
||||||
|
# Community cheatsheets must be installed separately, though you may have
|
||||||
|
# downloaded them automatically when installing 'cheat'. If not, you may
|
||||||
|
# download them here:
|
||||||
|
#
|
||||||
|
# https://github.com/cheat/cheatsheets
|
||||||
|
cheatpaths:
|
||||||
|
# Cheatpath properties mean the following:
|
||||||
|
# 'name': the name of the cheatpath
|
||||||
|
# (view with 'cheat -d', filter with 'cheat -p')
|
||||||
|
# 'path': the filesystem path of the cheatsheet directory
|
||||||
|
# (view with 'cheat -d')
|
||||||
|
# 'tags': tags that should be automatically applied to sheets on this path
|
||||||
|
# 'readonly': shall user-created ('cheat -e') cheatsheets be saved here?
|
||||||
|
- name: community
|
||||||
|
path: ~/.config/cheat/cheatsheets/community
|
||||||
|
tags: [ community ]
|
||||||
|
readonly: true
|
||||||
|
|
||||||
|
# If you have personalized cheatsheets, list them last. They will take
|
||||||
|
# precedence over the more global cheatsheets.
|
||||||
|
- name: personal
|
||||||
|
path: ~/.config/cheat/cheatsheets/personal
|
||||||
|
tags: [ personal ]
|
||||||
|
readonly: false
|
||||||
|
|
||||||
|
# While it requires no configuration here, it's also worth noting that
|
||||||
|
# cheat will automatically append directories named '.cheat' within the
|
||||||
|
# current working directory to the 'cheatpath'. This can be very useful if
|
||||||
|
# you'd like to closely associate cheatsheets with, for example, a directory
|
||||||
|
# containing source code.
|
||||||
|
#
|
||||||
|
# Such "directory-scoped" cheatsheets will be treated as the most "local"
|
||||||
|
# cheatsheets, and will override less "local" cheatsheets. Similarly,
|
||||||
|
# directory-scoped cheatsheets will always be editable ('readonly: false').
|
||||||
@@ -49,4 +49,14 @@ if [ "$SHELL" = "$(which zsh)" ]; then
|
|||||||
export HISTFILE="$XDG_STATE_HOME/zsh/history"
|
export HISTFILE="$XDG_STATE_HOME/zsh/history"
|
||||||
zstyle ':completion:*' cache-path "$XDG_CACHE_HOME/zsh/zcompcache"
|
zstyle ':completion:*' cache-path "$XDG_CACHE_HOME/zsh/zcompcache"
|
||||||
zstyle ':completion:*' list-colors "$LS_COLORS"
|
zstyle ':completion:*' list-colors "$LS_COLORS"
|
||||||
|
|
||||||
|
# fzf
|
||||||
|
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}"/fzf/fzf.zsh ] \
|
||||||
|
&& source "${XDG_CONFIG_HOME:-$HOME/.config}"/fzf/fzf.zsh
|
||||||
|
fi
|
||||||
|
|
||||||
|
# If we are using bash
|
||||||
|
if [ "$SHELL" = "$(which bash)" ]; then
|
||||||
|
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}"/fzf/fzf.bash ] \
|
||||||
|
&& source "${XDG_CONFIG_HOME:-$HOME/.config}"/fzf/fzf.bash
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
source "$DOTFILES/scripts/shared.sh"
|
source "$DOTFILES/scripts/shared.sh"
|
||||||
|
|
||||||
# Weather in Tampere, or other city
|
# Weather in Tampere, or other city
|
||||||
function weather
|
weather()
|
||||||
{
|
{
|
||||||
# https://github.com/chubin/wttr.in#usage
|
# https://github.com/chubin/wttr.in#usage
|
||||||
local city="${1:-Tampere}"
|
local city="${1:-Tampere}"
|
||||||
@@ -14,25 +14,25 @@ function weather
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Docker
|
# Docker
|
||||||
function ssh-docker
|
ssh-docker()
|
||||||
{
|
{
|
||||||
docker exec -it "$@" bash
|
docker exec -it "$@" bash
|
||||||
}
|
}
|
||||||
|
|
||||||
# Create a new directory and enter it
|
# Create a new directory and enter it
|
||||||
function mkd
|
mkd()
|
||||||
{
|
{
|
||||||
mkdir -p "$@" && cd "$@" || exit
|
mkdir -p "$@" && cd "$@" || exit
|
||||||
}
|
}
|
||||||
|
|
||||||
# All the dig info
|
# All the dig info
|
||||||
function digga
|
digga()
|
||||||
{
|
{
|
||||||
dig +nocmd "$1" any +multiline +noall +answer
|
dig +nocmd "$1" any +multiline +noall +answer
|
||||||
}
|
}
|
||||||
|
|
||||||
# Rector project to php version 8.0 by default.
|
# Rector project to php version 8.0 by default.
|
||||||
function rector
|
rector()
|
||||||
{
|
{
|
||||||
local php="${1:-80}"
|
local php="${1:-80}"
|
||||||
docker run -v "$(pwd)":/project rector/rector:latest process \
|
docker run -v "$(pwd)":/project rector/rector:latest process \
|
||||||
@@ -42,7 +42,7 @@ function rector
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Commit everything
|
# Commit everything
|
||||||
function commit
|
commit()
|
||||||
{
|
{
|
||||||
commitMessage="$*"
|
commitMessage="$*"
|
||||||
|
|
||||||
@@ -54,7 +54,7 @@ function commit
|
|||||||
eval "git commit -a -m '${commitMessage}'"
|
eval "git commit -a -m '${commitMessage}'"
|
||||||
}
|
}
|
||||||
|
|
||||||
function scheduler
|
scheduler()
|
||||||
{
|
{
|
||||||
while :; do
|
while :; do
|
||||||
php artisan schedule:run
|
php artisan schedule:run
|
||||||
@@ -63,13 +63,26 @@ function scheduler
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
function silent
|
silent()
|
||||||
{
|
{
|
||||||
"$@" >&/dev/null
|
"$@" >&/dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ask()
|
||||||
|
{
|
||||||
|
while true; do
|
||||||
|
read -p "$1 ([y]/n) " -r
|
||||||
|
REPLY=${REPLY:-"y"}
|
||||||
|
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||||
|
return 1
|
||||||
|
elif [[ $REPLY =~ ^[Nn]$ ]]; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
# Defines default antigen bundles
|
# Defines default antigen bundles
|
||||||
function x-default-antigen-bundles
|
x-default-antigen-bundles()
|
||||||
{
|
{
|
||||||
# these should be always available
|
# these should be always available
|
||||||
antigen bundle colored-man-pages
|
antigen bundle colored-man-pages
|
||||||
@@ -83,7 +96,6 @@ function x-default-antigen-bundles
|
|||||||
antigen bundle zsh-users/zsh-syntax-highlighting
|
antigen bundle zsh-users/zsh-syntax-highlighting
|
||||||
|
|
||||||
# these should be available if there's need
|
# these should be available if there's need
|
||||||
have git && antigen bundle git
|
|
||||||
have brew && antigen bundle brew
|
have brew && antigen bundle brew
|
||||||
have docker && antigen bundle docker
|
have docker && antigen bundle docker
|
||||||
have docker-compose && antigen bundle sroze/docker-compose-zsh-plugin
|
have docker-compose && antigen bundle sroze/docker-compose-zsh-plugin
|
||||||
|
|||||||
13
config/fzf/fzf.bash
Normal file
13
config/fzf/fzf.bash
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
# Setup fzf
|
||||||
|
# ---------
|
||||||
|
if [[ ! "$PATH" == */opt/homebrew/opt/fzf/bin* ]]; then
|
||||||
|
PATH="${PATH:+${PATH}:}/opt/homebrew/opt/fzf/bin"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Auto-completion
|
||||||
|
# ---------------
|
||||||
|
[[ $- == *i* ]] && source "/opt/homebrew/opt/fzf/shell/completion.bash" 2> /dev/null
|
||||||
|
|
||||||
|
# Key bindings
|
||||||
|
# ------------
|
||||||
|
source "/opt/homebrew/opt/fzf/shell/key-bindings.bash"
|
||||||
13
config/fzf/fzf.zsh
Normal file
13
config/fzf/fzf.zsh
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
# Setup fzf
|
||||||
|
# ---------
|
||||||
|
if [[ ! "$PATH" == */opt/homebrew/opt/fzf/bin* ]]; then
|
||||||
|
PATH="${PATH:+${PATH}:}/opt/homebrew/opt/fzf/bin"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Auto-completion
|
||||||
|
# ---------------
|
||||||
|
[[ $- == *i* ]] && source "/opt/homebrew/opt/fzf/shell/completion.zsh" 2> /dev/null
|
||||||
|
|
||||||
|
# Key bindings
|
||||||
|
# ------------
|
||||||
|
source "/opt/homebrew/opt/fzf/shell/key-bindings.zsh"
|
||||||
32
config/yamllint/config
Normal file
32
config/yamllint/config
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
---
|
||||||
|
extends: default
|
||||||
|
|
||||||
|
ignore-from-file: [.gitignore, .yamlignore]
|
||||||
|
|
||||||
|
rules:
|
||||||
|
braces:
|
||||||
|
level: warning
|
||||||
|
max-spaces-inside: 1
|
||||||
|
brackets:
|
||||||
|
level: warning
|
||||||
|
max-spaces-inside: 1
|
||||||
|
colons:
|
||||||
|
level: warning
|
||||||
|
commas:
|
||||||
|
level: warning
|
||||||
|
comments: disable
|
||||||
|
comments-indentation: disable
|
||||||
|
document-start: disable
|
||||||
|
empty-lines:
|
||||||
|
level: warning
|
||||||
|
hyphens:
|
||||||
|
level: warning
|
||||||
|
indentation:
|
||||||
|
level: warning
|
||||||
|
indent-sequences: consistent
|
||||||
|
line-length:
|
||||||
|
level: warning
|
||||||
|
allow-non-breakable-inline-mappings: true
|
||||||
|
max: 120
|
||||||
|
truthy: disable
|
||||||
|
|
||||||
@@ -94,8 +94,8 @@ function section_install
|
|||||||
nvm)
|
nvm)
|
||||||
curl -o- "https://raw.githubusercontent.com/nvm-sh/nvm/$VERSION_NVM/install.sh" | bash \
|
curl -o- "https://raw.githubusercontent.com/nvm-sh/nvm/$VERSION_NVM/install.sh" | bash \
|
||||||
&& nvm install --lts --latest-npm --default
|
&& nvm install --lts --latest-npm --default
|
||||||
git checkout "$DOTFILES/base/zshrc"
|
git checkout "$DOTFILES/base/zshrc"
|
||||||
msg_yay "nvm installed!"
|
msg_yay "nvm installed!"
|
||||||
;;
|
;;
|
||||||
npm)
|
npm)
|
||||||
bash "$DOTFILES/scripts/install-npm-packages.sh" \
|
bash "$DOTFILES/scripts/install-npm-packages.sh" \
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ have go && {
|
|||||||
github.com/google/yamlfmt/cmd/yamlfmt@latest
|
github.com/google/yamlfmt/cmd/yamlfmt@latest
|
||||||
github.com/ericchiang/pup@latest
|
github.com/ericchiang/pup@latest
|
||||||
github.com/suntong/html2md@latest
|
github.com/suntong/html2md@latest
|
||||||
|
github.com/cheat/cheat/cmd/cheat@latest
|
||||||
)
|
)
|
||||||
|
|
||||||
for pkg in "${packages[@]}"; do
|
for pkg in "${packages[@]}"; do
|
||||||
|
|||||||
Reference in New Issue
Block a user