Compare commits

..

56 Commits

Author SHA1 Message Date
b5dd8c3eab feat(tmux): New plugins and configurations 2023-05-07 23:50:57 +03:00
d2a84e6d20 feat(nvim): Update astronvim to v3.15.2 2023-05-07 23:00:56 +03:00
e29bd04c7d Chore(cheat): tldr pages tweaks 2023-05-07 22:58:28 +03:00
2b6fa42f17 Chore: Lots of little tweaks 2023-05-05 23:03:42 +03:00
8de487250d Feat: Pure Bash Bible and TLDR in cheat 2023-05-05 23:02:31 +03:00
e5fe49834d Fix: Changes to have command usage 2023-05-05 22:59:14 +03:00
edd56c80eb feat(nvim): Update astronvim and tweak null-ls 2023-05-03 16:22:32 +03:00
eaedd40e06 feat(tmux): Plugins and configurations 2023-05-03 16:22:02 +03:00
06a53759ac chore(astronvim): Plugins reshuffle 2023-05-03 09:17:01 +03:00
3c98117c05 Chore: Update astronvim, tweak gitmodules 2023-05-02 14:47:49 +03:00
c3aa6b77e5 Chore: Fixes, repo dotfiles 2023-04-30 14:56:30 +03:00
66739fa765 Fix: Make sure personal cheatsheet folder exists 2023-04-28 14:53:43 +03:00
ff01a27b3c Chore: Deleted install-without-plugins 2023-04-28 14:50:57 +03:00
383855f23a Feat: fzf, configs and installer 2023-04-27 22:58:34 +03:00
a5db6a465e Chore: Catppuccin config, alpha-nvim header 2023-04-27 22:53:22 +03:00
293b847f79 Fix: Formatting, chmod +x magick 2023-04-27 16:39:06 +03:00
df14c71c17 Feat: Install neofetch 2023-04-27 16:38:26 +03:00
29d46c5790 Feat: nvim neo-tree configuration 2023-04-27 15:29:27 +03:00
d6565761ab Chore: Codestyle changes, split lines that went over limit 2023-04-27 15:27:17 +03:00
0feb7a47ae Chore: Document go packages, add glow 2023-04-27 15:09:34 +03:00
161d0b8875 Chore: Package maintenance 2023-04-27 11:57:27 +03:00
d7f7240348 Fix: tmux colors 2023-04-27 11:56:25 +03:00
7de714161c Feat: Update iTerm2 config, add itermcolors 2023-04-27 11:56:11 +03:00
263fca5839 Feat: Configuration updates 2023-04-27 01:12:31 +03:00
02577547ce Feat: Removed js-debug, added tldr 2023-04-26 23:55:49 +03:00
7f11a7073e Fix: Removed dotbot-gh-extension 2023-04-26 23:54:48 +03:00
af38f7aa45 Chore: cheat color scheme is now catppuccin-mocha 2023-04-26 23:47:50 +03:00
74df61ed1d Feat: tmux config + plugin manager 2023-04-26 23:45:28 +03:00
6126827503 Feat: Moved astronvim user config from submodule 2023-04-26 23:44:19 +03:00
fb48a86b27 Chore: Move renovate config under .github 2023-04-24 23:10:39 +03:00
f84d70ea61 Chore: Update nvim user config 2023-04-24 22:27:01 +03:00
14f02a2b93 Config: Disable snyk ad 2023-04-24 22:17:49 +03:00
9f60efee33 Chore: Update nvim 2023-04-24 22:16:59 +03:00
a834a9138a CI: Shellcheck ignore 1091 2023-04-24 16:58:57 +03:00
3a9ca6edab Chore: Update Brewfile 2023-04-24 16:24:20 +03:00
d8292ca033 fmt + brewfile update 2023-04-22 14:57:27 +03:00
e929b85669 brew: fzf 2023-04-22 14:56:34 +03:00
775d2abf13 tools: cheat configs & dirs 2023-04-22 11:17:36 +03:00
740ad17207 Tool: cheat, yamllint configs 2023-04-21 01:45:43 +03:00
c9d0284c91 dfm: Install command improvements 2023-04-18 07:44:01 +03:00
ac8b7beb9b scripts: x-hr & x-welxome-banner 2023-04-17 23:16:33 +03:00
2fa6c69e4a Submodule updates 2023-04-17 09:05:33 +03:00
c1287c4ea8 dfm: menu rework, docs. codestyle fixes. 2023-04-14 10:10:32 +03:00
7b63afd4f5 dfm: Fix imagick installation 2023-04-14 00:48:37 +03:00
e5d6cb37fd shell: have, path_(append|prepend|remove)
- have: command -v shorthand
- path_append: appends dir to PATH
- path_prepend: prepends dir to PATH
- path_remove: removes dir from PATH
2023-04-14 00:42:08 +03:00
4492c386b6 dfm: rewrote the usage menu generation 2023-04-14 00:01:58 +03:00
5f5f79d270 misc: dfm tweaks, documentation, code style 2023-04-13 22:23:22 +03:00
dcd042262f dotbot: removed gh-extension, use old script 2023-04-13 22:21:49 +03:00
268fd35bdb scripts: formatting, x-thumbgen, imagick installer 2023-04-13 16:31:39 +03:00
38a6f6f8e4 nvim: update to v3.10.2 2023-04-13 16:19:41 +03:00
d504fc5f2b misc: .screenrc, config, functions & new scripts! 2023-04-13 08:41:14 +03:00
4b1feb16fc zsh: PATH and shellcheck stuff 2023-04-12 10:07:51 +03:00
9331b2b643 formatters, go packages and examples 2023-04-08 10:02:44 +03:00
5ce9906ff1 shell: split exports, reorg them. add x-dc script 2023-04-08 03:38:09 +03:00
dbadcc3b6c zsh: enable colors in listings, enable gcloud 2023-04-04 14:15:59 +03:00
Ismo Vuorinen
4f2fd3cfd6 Merge 2023-04-03 11:15:08 +03:00
72 changed files with 5647 additions and 380 deletions

19
.ecrc Normal file
View File

@@ -0,0 +1,19 @@
{
"Version": "2.7.0",
"Verbose": false,
"Debug": false,
"IgnoreDefaults": false,
"SpacesAftertabs": false,
"NoColor": false,
"Exclude": [],
"AllowedContentTypes": [],
"PassedFiles": [],
"Disable": {
"EndOfLine": false,
"Indentation": false,
"InsertFinalNewline": false,
"TrimTrailingWhitespace": false,
"IndentSize": false,
"MaxLineLength": false
}
}

View File

@@ -8,24 +8,15 @@ indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
[*.lua]
insert_final_newline = true
[.git{ignore,modules}]
indent_style = tab
indent_size = 1
[*.yaml]
indent_size = 2
insert_final_newline = true
[*.yml]
indent_size = 2
insert_final_newline = true
[*.sh]
indent_size = 2
indent_style = space
insert_final_newline = true
[local/bin/*]
shell_variant = bash # --language-variant
binary_next_line = true
switch_case_indent = true # --case-indent
space_redirects = false
keep_padding = false
function_next_line = true # --func-next-line
switch_case_indent = true # --case-indent
space_redirects = true
keep_padding = true
function_next_line = true # --func-next-line

5
.gitignore vendored
View File

@@ -1,6 +1,9 @@
Brewfile.lock.json
*.log
*-secret
*cache
.idea
.vscode
config/fzf
config/cheat/cheatsheets/pure-bash-bible/*
config/cheat/cheatsheets/tldr/*

21
.gitmodules vendored
View File

@@ -1,3 +1,4 @@
# vim: set expandtab:
[submodule "dotbot"]
path = dotbot
url = https://github.com/anishathalye/dotbot.git
@@ -8,11 +9,6 @@
url = https://github.com/wren/dotbot-brew.git
ignore = dirty
[submodule "dotbot-gh-extension"]
path = dotbot-gh-extension
url = https://github.com/fundor333/dotbot-gh-extension.git
ignore = dirty
[submodule "dotbot-include"]
path = dotbot-include
url = https://gitlab.com/gnfzdz/dotbot-include.git
@@ -23,11 +19,14 @@
url = https://github.com/AstroNvim/AstroNvim.git
ignore = dirty
branch = main
update = checkout
shallow = true
[submodule "config/astronvim/lua/user"]
path = config/astronvim/lua/user
url = https://github.com/ivuorinen/astronvim_config.git
update = rebase
branch = main
[submodule "cheat-community"]
path = config/cheat/cheatsheets/community
url = https://github.com/cheat/cheatsheets.git
ignore = dirty
[submodule "tmux/tpm"]
path = config/tmux/plugins/tpm
url = https://github.com/tmux-plugins/tpm.git
ignore = dirty

7
.shellcheckrc Normal file
View File

@@ -0,0 +1,7 @@
# This is shellcheck configuration file.
# Set whether or not to follow arbitrary file
# paths in source statements (since 0.8.0).
external-sources=true
includeAllWorkspaceSymbols=true

7
.stylua.toml Normal file
View File

@@ -0,0 +1,7 @@
column_width = 120
line_endings = "Unix"
indent_type = "Spaces"
indent_width = 2
quote_style = "AutoPreferDouble"
call_parentheses = "None"
collapse_simple_statement = "Always"

View File

@@ -22,4 +22,3 @@ exclude:
- ./dotbot-*/**
- ./config/astronvim/**
- ./config/nvim/**

2
.yamlignore Normal file
View File

@@ -0,0 +1,2 @@
# .yamlignore

View File

@@ -25,10 +25,14 @@ brew "ansible-lint"
brew "zstd"
# Open Source Kubernetes Marketplace
brew "arkade"
# Spell checker with better logic than ispell
brew "aspell"
# Automatic configure script builder
brew "autoconf"
# GNU File, Shell, and Text utilities
brew "coreutils"
# Extendable version manager with support for Ruby, Node.js, Erlang & more
brew "asdf"
# Spell checker with better logic than ispell
brew "aspell"
# Official Amazon AWS command-line interface
brew "awscli"
# Terminal bandwidth utilization tool
@@ -43,10 +47,10 @@ brew "brew-php-switcher"
brew "glib"
# Manage compile and link flags for libraries
brew "pkg-config"
# Human-friendly and fast alternative to cut and (sometimes) awk
brew "choose-rust"
# Cross-platform make
brew "cmake"
# GNU File, Shell, and Text utilities
brew "coreutils"
# Get, unpack, build, and install modules from CPAN
brew "cpanminus"
# Open source suite of directory software
@@ -69,10 +73,14 @@ brew "eg-examples"
brew "faas-cli"
# Simple, fast and user-friendly alternative to find
brew "fd"
# Banner-like program prints strings as ASCII art
brew "figlet"
# Libraries to talk to Microsoft SQL Server and Sybase databases
brew "freetds"
# Monitor a directory for changes and run a shell command
brew "fswatch"
# Command-line fuzzy finder written in Go
brew "fzf"
# Disk usage analyzer with console interface written in Go
brew "gdu", link: false
# GitHub command-line tool
@@ -87,6 +95,8 @@ brew "git-flow-avh"
brew "git-recent"
# Open-source GitLab command-line tool
brew "glab"
# Render markdown on the CLI
brew "glow"
# GNU implementation of the famous stream editor
brew "gnu-sed"
# Validating, recursive, caching DNS resolver
@@ -103,8 +113,6 @@ brew "netpbm"
brew "icu4c"
# OpenType text shaping engine
brew "harfbuzz"
# Framework for layout and rendering of i18n text
brew "pango"
# Library to render SVG files using Cairo
brew "librsvg"
# Graph visualization software from AT&T and Bell Labs
@@ -129,6 +137,8 @@ brew "lazydocker"
brew "libpq"
# Linguistic software and Finnish dictionary
brew "libvoikko"
# Rainbows and unicorns in your console!
brew "lolcat"
# Package manager for the Lua programming language
brew "luarocks"
# Swiss Army Knife for macOS
@@ -139,8 +149,6 @@ brew "mas"
brew "midnight-commander"
# Ambitious Vim-fork focused on extensibility and agility
brew "neovim"
# No Nonsense Neovim Client in Rust
brew "neovide"
# Port scanning utility for large networks
brew "nmap"
# Manage multiple Node.js versions
@@ -155,6 +163,8 @@ brew "pandoc"
brew "perl"
# General-purpose scripting language
brew "php@8.1"
# Simple Python style checker in one Python file
brew "pycodestyle"
# Python version management
brew "pyenv"
# Migrate pip packages from one Python version to another
@@ -213,6 +223,8 @@ brew "watch"
brew "wget"
# Personal information dashboard for your terminal
brew "wtfutil"
# Check your $HOME for unwanted files and directories
brew "xdg-ninja"
# JavaScript package manager
brew "yarn"
# A vulnerability scanner for container images and filesystems
@@ -243,6 +255,8 @@ brew "teamookla/speedtest/speedtest"
cask "1password-cli"
# Text editor
cask "coda"
# Universal database tool and SQL client
cask "dbeaver-community"
# App to build and share containerized applications and microservices
cask "docker"
# Reimagine your terminal
@@ -273,10 +287,14 @@ cask "insomnia"
cask "jetbrains-toolbox"
# Kubernetes IDE
cask "lens"
# Keep all tasks from your todo apps on your menu bar
cask "monofocus"
# Neovim Client
cask "neovide"
# Reverse proxy, secure introspectable tunnels to localhost
cask "ngrok"
# Scheduling application focusing on organization
cask "omnifocus"
# Collaboration platform for API development
cask "postman"
# Display image info and preview unsupported formats in QuickLook
@@ -291,6 +309,8 @@ cask "quicklook-json"
cask "quicklookase"
# Automatically hides or quits apps after periods of inactivity
cask "quitter"
# Control your tools with a few keystrokes
cask "raycast"
# Move and resize windows using keyboard shortcuts or snap areas
cask "rectangle"
# MySQL/MariaDB database management
@@ -313,9 +333,10 @@ cask "vlc"
cask "voikkospellservice"
# Rust-based terminal
cask "warp"
# Mastodon, Pleroma, and Misskey client
cask "whalebird"
# View output from scripts in the menu bar
cask "xbar"
mas "1Password for Safari", id: 1569813296
mas "Flow", id: 1423210932
mas "pullBar", id: 1601913905
mas "Tailscale", id: 1475387142

4
add-submodules.sh Normal file → Executable file
View File

@@ -1,5 +1,7 @@
#!/usr/bin/env bash
git submodule add --name dotbot-brew -f https://github.com/wren/dotbot-brew.git dotbot-brew
git submodule add --name dotbot-gh-extension -f https://github.com/fundor333/dotbot-gh-extension.git dotbot-gh-extension
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
git submodule add --name tmux/tpm -f https://github.com/tmux-plugins/tpm.git config/tmux/plugins/tpm

View File

@@ -19,3 +19,5 @@ x-load-configs
# Import ssh keys in keychain
ssh-add -A 2>/dev/null;
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}"/fzf/fzf.bash ] && source "${XDG_CONFIG_HOME:-$HOME/.config}"/fzf/fzf.bash

View File

@@ -3,9 +3,12 @@
autoload -U colors zsh/terminfo
colors
setopt correct
# Defaults
export DOTFILES="$HOME/.dotfiles"
# shellcheck source=shared.sh
source "$DOTFILES/scripts/shared.sh"
# Run x-load-configs in your terminal to reload the files.
function x-load-configs()
@@ -28,13 +31,16 @@ ANTIGEN_ZSH_PATH="$XDG_BIN_HOME/antigen.zsh"
[[ -f "$ANTIGEN_ZSH_PATH" ]] && source "$ANTIGEN_ZSH_PATH"
# antigen is present
if command -v antigen &> /dev/null; then
have antigen && {
antigen use oh-my-zsh
# config/functions
x-default-antigen-bundles
antigen apply
fi
}
eval "$(starship init zsh)"
# starship is present
have starship && eval "$(starship init zsh)"
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}"/fzf/fzf.zsh ] && source "${XDG_CONFIG_HOME:-$HOME/.config}"/fzf/fzf.zsh

View File

@@ -1,9 +1,11 @@
#!/usr/bin/env bash
# shellcheck source="../scripts/shared.sh"
source "$DOTFILES/scripts/shared.sh"
# Get installed php versions from brew and setup aliases
function x-set-php-aliases
{
if command -v brew &> /dev/null; then
have brew && {
local php_versions=()
while IFS="" read -r line; do php_versions+=("$line"); done < <(brew list | grep '^php')
@@ -15,9 +17,6 @@ function x-set-php-aliases
# replace "php@" with "p" so "php@80" becomes "p80"
local php_alias="${php_abbr//php@/p}"
# Skip php = php aliasing
# if [[ "$php_abbr" == "$php_alias" ]]; then continue; fi;
# Fetch the exec path once
php_exec="$(brew --prefix "$version")/bin/php"
@@ -34,7 +33,7 @@ function x-set-php-aliases
# shellcheck disable=SC2139,SC2140
alias "${php_alias}c"="$php_exec $php_error_reporting $(which composer)"
done
fi
}
}
if [[ $(uname) == 'Darwin' ]]; then
@@ -55,10 +54,18 @@ if [[ $(uname) == 'Darwin' ]]; then
alias emptytrash="sudo rm -rfv /Volumes/*/.Trashes; sudo rm -rfv ~/.Trash; sudo rm -rfv /private/var/log/asl/*.asl"
fi
alias watchx='watch -dpbc' # watch with: differences, precise, beep and color
# watch with: differences, precise, beep and color
alias watchx='watch -dpbc'
# delete .DS_Store files
alias zapds='find . -name ".DS_Store" -print -delete'
alias t='tail -f' # tail with follow flag on
alias dn='du -chd1' # directory usage, return only the total
# tail with follow flag on
alias t='tail -f'
# directory usage, return only the total
alias dn='du -chd1'
# Mirror site with wget
alias mirror_site='wget -m -k -K -E -e robots=off'
# Mirror stdout to stderr, useful for seeing data going through a pipe
alias peek='tee >(cat 1>&2)'
alias code_scanner='docker run
--env SOURCE_CODE="$PWD"
@@ -69,6 +76,9 @@ alias code_scanner='docker run
alias zedit='$EDITOR ~/.dotfiles'
have irssi \
&& alias irssi="irssi --config='$IRSSI_CONFIG_FILE' --home='$IRSSI_CONFIG_HOME'"
if [[ -f "$HOME/.aliases.local" ]]; then
# shellcheck disable=SC1091
source "$HOME/.aliases.local"

View File

@@ -0,0 +1,674 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.

View File

@@ -0,0 +1,3 @@
return { -- a table of overrides/changes to the duskfox theme
Normal = { bg = "#000000" },
}

View File

@@ -0,0 +1,3 @@
return { -- this table overrides highlights in all themes
-- Normal = { bg = "#000000" },
}

View File

@@ -0,0 +1,94 @@
return {
-- Configure AstroNvim updates
updater = {
remote = "origin", -- remote to use
channel = "stable", -- "stable" or "nightly"
version = "latest", -- "latest", tag name, or regex search like "v1.*" to only do updates before v2 (STABLE ONLY)
branch = "nightly", -- branch name (NIGHTLY ONLY)
commit = nil, -- commit hash (NIGHTLY ONLY)
pin_plugins = nil, -- nil, true, false (nil will pin plugins on stable only)
skip_prompts = false, -- skip prompts about breaking changes
show_changelog = true, -- show the changelog after performing an update
auto_quit = true, -- automatically quit the current session after a successful update
remotes = { -- easily add new remotes to track
-- ["remote_name"] = "https://remote_url.come/repo.git", -- full remote url
-- ["remote2"] = "github_user/repo", -- GitHub user/repo shortcut,
-- ["remote3"] = "github_user", -- GitHub user assume AstroNvim fork
},
},
-- Set colorscheme to use
colorscheme = "catppuccin", -- or astrondark
-- Diagnostics configuration (for vim.diagnostics.config({...}))
-- when diagnostics are on
diagnostics = {
virtual_text = false,
underline = true,
},
lsp = {
-- customize lsp formatting options
formatting = {
-- control auto formatting on save
format_on_save = {
-- enable or disable format on save globally
enabled = true,
-- enable format on save for specified filetypes only
allow_filetypes = {
-- "go",
},
-- disable format on save for specified filetypes
ignore_filetypes = {
-- "python",
},
},
-- disable formatting capabilities for the listed language servers
disabled = {
-- "sumneko_lua",
},
-- default format timeout
timeout_ms = 1000,
-- -- fully override the default formatting function
-- filter = function(client) -- fully override the default formatting function
-- return true
-- end
},
-- enable servers that you already have installed without mason
servers = {
-- "pyright"
},
},
-- Configure require("lazy").setup() options
lazy = {
defaults = { lazy = true },
performance = {
rtp = {
-- customize default disabled vim plugins
disabled_plugins = {
"tohtml",
"gzip",
"matchit",
"zipPlugin",
"netrwPlugin",
"tarPlugin",
"matchparen",
},
},
},
},
-- This function is run last and is a good place to configuring
-- augroups/autocommands and custom filetypes also this just pure lua so
-- anything that doesn't fit in the normal config locations above can go here
polish = function()
-- Set up custom filetypes
-- vim.filetype.add {
-- extension = {
-- foo = "fooscript",
-- },
-- filename = {
-- ["Foofile"] = "fooscript",
-- },
-- pattern = {
-- ["~/%.config/foo/.*"] = "fooscript",
-- },
-- }
end,
}

View File

@@ -0,0 +1,30 @@
-- Mapping data with "desc" stored directly by vim.keymap.set().
--
-- Please use this mappings table to set keyboard mapping since this is the
-- lower level configuration and more robust one. (which-key will
-- automatically pick-up stored data by this setting.)
return {
-- first key is the mode
n = {
-- second key is the lefthand side of the map
-- mappings seen under group name "Buffer"
["<leader>bn"] = { "<cmd>tabnew<cr>", desc = "New tab" },
["<leader>bD"] = {
function()
require("astronvim.utils.status").heirline.buffer_picker(
function(bufnr) require("astronvim.utils.buffer").close(bufnr) end
)
end,
desc = "Pick to close",
},
-- tables with the `name` key will be registered with which-key if it's installed
-- this is useful for naming menus
["<leader>b"] = { name = "Buffers" },
-- quick save
-- ["<C-s>"] = { ":w!<cr>", desc = "Save File" }, -- change description but the same command
},
t = {
-- setting a mapping to false will disable it
-- ["<esc>"] = false,
},
}

View File

@@ -0,0 +1,38 @@
-- set vim options here (vim.<first_key>.<second_key> = value)
return {
opt = {
-- set to true or false etc.
relativenumber = true, -- sets vim.opt.relativenumber
number = true, -- sets vim.opt.number
spell = false, -- sets vim.opt.spell
signcolumn = "auto", -- sets vim.opt.signcolumn to auto
wrap = true, -- sets vim.opt.wrap
},
g = {
-- sets vim.g.mapleader
mapleader = " ",
-- enable or disable auto formatting at start (lsp.formatting.format_on_save must be enabled)
autoformat_enabled = true,
-- enable completion at start
cmp_enabled = true,
-- enable autopairs at start
autopairs_enabled = true,
-- set the visibility of diagnostics in the UI
-- (0=off, 1=only show in status line, 2=virtual text off, 3=all on)
diagnostics_mode = 3,
-- disable icons in the UI (disable if no nerd font is available,
-- requires :PackerSync after changing)
icons_enabled = true,
-- disable notifications when toggling UI elements
ui_notifications_enabled = true,
},
}
-- If you need more control, you can use the function()...end notation
-- return function(local_vim)
-- local_vim.opt.relativenumber = true
-- local_vim.g.mapleader = " "
-- local_vim.opt.whichwrap = vim.opt.whichwrap - { 'b', 's' } -- removing option from list
-- local_vim.opt.shortmess = vim.opt.shortmess + { I = true } -- add to option list
--
-- return local_vim
-- end

View File

@@ -0,0 +1,44 @@
return { -- Add the community repository of plugin specifications
"AstroNvim/astrocommunity", -- example of imporing a plugin, comment out to use it or add your own
-- available plugins can be found at
-- https://github.com/AstroNvim/astrocommunity
{
import = "astrocommunity.colorscheme.catppuccin",
opts = {
flavour = "mocha",
transparent_background = true,
dim_inactive = {
enabled = true,
shade = "dark",
percentage = 0.15,
},
}
},
-- { import = "astrocommunity.completion.copilot-lua-cmp" },
{ import = "astrocommunity.bars-and-lines.smartcolumn-nvim" },
{
"m4xshen/smartcolumn.nvim",
opts = {
colorcolumn = { "80", "100", "120" },
disabled_filetypes = { "help", "text", "markdown" },
},
},
{ import = "astrocommunity.diagnostics.lsp_lines-nvim" },
{ import = "astrocommunity.diagnostics.trouble-nvim" },
{ import = "astrocommunity.editing-support.refactoring-nvim" },
{ import = "astrocommunity.editing-support.neogen" },
{ import = "astrocommunity.editing-support.nvim-regexplainer" },
{ import = "astrocommunity.editing-support.todo-comments-nvim" },
{ import = "astrocommunity.indent.mini-indentscope" },
{ import = "astrocommunity.markdown-and-latex.glow-nvim" },
{ import = "astrocommunity.motion.harpoon" },
{ import = "astrocommunity.pack.php" },
{ import = "astrocommunity.pack.typescript" },
{ import = "astrocommunity.project.neoconf-nvim" },
{ import = "astrocommunity.project.nvim-spectre" },
{ import = "astrocommunity.project.project-nvim" },
{ import = "astrocommunity.test.neotest" },
{ import = "astrocommunity.utility.neodim" },
{ import = "astrocommunity.utility.transparent-nvim" },
}

View File

@@ -0,0 +1,107 @@
return {
-- customize alpha options
{
"goolord/alpha-nvim",
opts = function(_, opts)
-- customize the dashboard header
opts.section.header.val = {
"░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░",
"░░░░░░░░░░▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄░░░░░░░░░",
"░░░░░░░░▄▀░░░░░░░░░░░░▄░░░░░░░▀▄░░░░░░░",
"░░░░░░░░█░░▄░░░░▄░░░░░░░░░░░░░░█░░░░░░░",
"░░░░░░░░█░░░░░░░░░░░░▄█▄▄░░▄░░░█░▄▄▄░░░",
"░▄▄▄▄▄░░█░░░░░░▀░░░░▀█░░▀▄░░░░░█▀▀░██░░",
"░██▄▀██▄█░░░▄░░░░░░░██░░░░▀▀▀▀▀░░░░██░░",
"░░▀██▄▀██░░░░░░░░▀░██▀░░░░░░░░░░░░░▀██░",
"░░░░▀████░▀░░░░▄░░░██░░░▄█░░░░▄░▄█░░██░",
"░░░░░░░▀█░░░░▄░░░░░██░░░░▄░░░▄░░▄░░░██░",
"░░░░░░░▄█▄░░░░░░░░░░░▀▄░░▀▀▀▀▀▀▀▀░░▄▀░░",
"░░░░░░█▀▀█████████▀▀▀▀████████████▀░░░░",
"░░░░░░████▀░░███▀░░░░░░▀███░░▀██▀░░░░░░",
"░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░"
}
return opts
end,
},
-- You can disable default plugins as follows:
-- { "max397574/better-escape.nvim", enabled = false },
--
-- You can also easily customize additional setup of plugins
-- that is outside of the plugin's setup call
{
"L3MON4D3/LuaSnip",
config = function(plugin, opts)
-- include the default astronvim config that calls the setup call
require "plugins.configs.luasnip" (plugin, opts)
-- add more custom luasnip configuration such
-- as filetype extend or custom snippets
local luasnip = require "luasnip"
luasnip.filetype_extend("javascript", { "javascriptreact" })
end,
},
{
"nvim-neo-tree/neo-tree.nvim",
opts = function(_, opts)
require "plugins.neo-tree"
opts.filesystem.filtered_items = {
visible = false,
show_hidden_count = true,
hide_dotfiles = false,
hide_gitignored = true,
hide_by_name = {
},
never_show = {
'.git',
'.DS_Store',
'thumbs.db'
},
}
return opts
end,
},
-- {
-- "windwp/nvim-autopairs",
-- config = function(plugin, opts)
-- -- include the default astronvim config that calls the setup call
-- require "plugins.configs.nvim-autopairs"(plugin, opts)
-- -- add more custom autopairs configuration such as custom rules
-- local npairs = require "nvim-autopairs"
-- local Rule = require "nvim-autopairs.rule"
-- local cond = require "nvim-autopairs.conds"
-- npairs.add_rules(
-- {
-- Rule("$", "$", { "tex", "latex" })
-- -- don't add a pair if the next character is %
-- :with_pair(cond.not_after_regex "%%")
-- -- don't add a pair if the previous character is xxx
-- :with_pair(
-- cond.not_before_regex("xxx", 3)
-- )
-- -- don't move right when repeat character
-- :with_move(cond.none())
-- -- don't delete if the next character is xx
-- :with_del(cond.not_after_regex "xx")
-- -- disable adding a newline when you press <cr>
-- :with_cr(cond.none()),
-- },
-- -- disable for .vim files, but it work for another filetypes
-- Rule("a", "a", "-vim")
-- )
-- end,
-- },
-- By adding to the which-key config and using our helper
-- function you can add more which-key registered bindings
{
"folke/which-key.nvim",
config = function(plugin, opts)
-- include the default astronvim config that calls the setup call
require "plugins.configs.which-key" (plugin, opts)
-- Add bindings which show up as group name
local wk = require "which-key"
wk.register({
b = { name = "Buffer" },
}, { mode = "n", prefix = "<leader>" })
end,
},
}

View File

@@ -0,0 +1,47 @@
-- customize mason plugins
return { -- use mason-lspconfig to configure LSP installations
{
"williamboman/mason-lspconfig.nvim",
-- overrides `require("mason-lspconfig").setup(...)`
opts = {
ensure_installed = {
"ansiblels",
"bashls",
"clangd",
"codeqlls",
"cssls",
"diagnosticls",
"docker_compose_language_service",
"dockerls",
"eslint",
"graphql",
"html",
"intelephense",
"jsonls",
"psalm",
"stylelint_lsp",
"tailwindcss",
"tsserver",
"vuels",
"yamlls",
},
},
}, -- use mason-null-ls to configure Formatters/Linter installation for null-ls sources
{
"jay-babu/mason-null-ls.nvim",
-- overrides `require("mason-null-ls").setup(...)`
opts = {
automatic_setup = true,
automatic_installation = true,
},
},
{
"jay-babu/mason-nvim-dap.nvim",
-- overrides `require("mason-nvim-dap").setup(...)`
opts = {
automatic_installation = true,
automatic_setup = true,
ensure_installed = { "python", "php", "js", "bash" },
},
},
}

View File

@@ -0,0 +1,54 @@
return {
"jose-elias-alvarez/null-ls.nvim",
opts = function(_, config)
-- config variable is the default configuration table for the setup function call
local null_ls = require "null-ls"
-- Check supported formatters and linters
-- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins/formatting
-- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins/diagnostics
config.sources = {
-- Set a formatter
null_ls.builtins.code_actions.eslint,
null_ls.builtins.code_actions.refactoring,
null_ls.builtins.code_actions.shellcheck,
null_ls.builtins.diagnostics.actionlint,
null_ls.builtins.diagnostics.alex,
null_ls.builtins.diagnostics.ansiblelint,
null_ls.builtins.diagnostics.dotenv_linter,
null_ls.builtins.diagnostics.editorconfig_checker,
null_ls.builtins.diagnostics.eslint,
null_ls.builtins.diagnostics.jsonlint,
null_ls.builtins.diagnostics.luacheck,
null_ls.builtins.diagnostics.php,
null_ls.builtins.diagnostics.phpcs,
null_ls.builtins.diagnostics.phpstan,
null_ls.builtins.diagnostics.psalm,
null_ls.builtins.diagnostics.semgrep,
null_ls.builtins.diagnostics.shellcheck,
null_ls.builtins.diagnostics.standardjs,
null_ls.builtins.diagnostics.stylelint,
null_ls.builtins.diagnostics.tfsec,
null_ls.builtins.diagnostics.trail_space,
null_ls.builtins.diagnostics.tsc,
null_ls.builtins.diagnostics.vacuum,
null_ls.builtins.diagnostics.vint,
null_ls.builtins.diagnostics.vulture,
null_ls.builtins.diagnostics.yamllint,
null_ls.builtins.diagnostics.zsh,
null_ls.builtins.formatting.blade_formatter,
null_ls.builtins.formatting.clang_format,
null_ls.builtins.formatting.eslint,
null_ls.builtins.formatting.fixjson,
null_ls.builtins.formatting.isort,
null_ls.builtins.formatting.jq,
null_ls.builtins.formatting.phpcsfixer,
null_ls.builtins.formatting.prettierd,
null_ls.builtins.formatting.shfmt.with {
args = { "-i", "1", "-bn", "-ci", "-sr", "-kb", "-fn" },
},
null_ls.builtins.formatting.stylelint,
}
return config -- return final config table
end,
}

View File

@@ -0,0 +1,33 @@
return {
"nvim-treesitter/nvim-treesitter",
opts = {
ensure_installed = {
"bash",
"c",
"cmake",
"comment",
"diff",
"dockerfile",
"gitignore",
"graphql",
"html",
"javascript",
"json",
"json5",
"latex",
"lua",
"markdown",
"php",
"phpdoc",
"python",
"scss",
"terraform",
"todotxt",
"toml",
"typescript",
"vim",
"vue",
"yaml",
},
},
}

View File

@@ -0,0 +1,15 @@
return {
-- You can also add new plugins here as well:
-- Add plugins, the lazy syntax
"andweeb/presence.nvim",
{
"ray-x/lsp_signature.nvim",
event = "BufRead",
config = function() require("lsp_signature").setup() end,
},
{
"wakatime/vim-wakatime",
lazy = false,
enabled = true,
},
}

91
config/cheat/conf.yml Normal file
View File

@@ -0,0 +1,91 @@
---
# 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: "catppuccin"
# 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: ~/.dotfiles/config/cheat/cheatsheets/personal
tags: [ personal ]
readonly: false
- name: pure-bash-bible
path: ~/.dotfiles/config/cheat/cheatsheets/pure-bash-bible
tags: [ pure-bash-bible ]
readonly: true
- name: tldr
path: ~/.dotfiles/config/cheat/cheatsheets/tldr
tags: [ tldr ]
readonly: true
# 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').

233
config/dircolors Normal file
View File

@@ -0,0 +1,233 @@
# Configuration file for dircolors, a utility to help you set the
# LS_COLORS environment variable used by GNU ls with the --color option.
# Copyright (C) 1996-2023 Free Software Foundation, Inc.
# Copying and distribution of this file, with or without modification,
# are permitted provided the copyright notice and this notice are preserved.
#
# The keywords COLOR, OPTIONS, and EIGHTBIT (honored by the
# slackware version of dircolors) are recognized but ignored.
# Global config options can be specified before TERM or COLORTERM entries
# ===================================================================
# Terminal filters
# ===================================================================
# Below are TERM or COLORTERM entries, which can be glob patterns, which
# restrict following config to systems with matching environment variables.
COLORTERM ?*
TERM Eterm
TERM ansi
TERM *color*
TERM con[0-9]*x[0-9]*
TERM cons25
TERM console
TERM cygwin
TERM *direct*
TERM dtterm
TERM gnome
TERM hurd
TERM jfbterm
TERM konsole
TERM kterm
TERM linux
TERM linux-c
TERM mlterm
TERM putty
TERM rxvt*
TERM screen*
TERM st
TERM terminator
TERM tmux*
TERM vt100
TERM xterm*
# ===================================================================
# Basic file attributes
# ===================================================================
# Below are the color init strings for the basic file types.
# One can use codes for 256 or more colors supported by modern terminals.
# The default color codes use the capabilities of an 8 color terminal
# with some additional attributes as per the following codes:
# Attribute codes:
# 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed
# Text color codes:
# 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
# Background color codes:
# 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white
#NORMAL 00 # no color code at all
#FILE 00 # regular file: use no color at all
RESET 0 # reset to "normal" color
DIR 01;34 # directory
LINK 01;36 # symbolic link. (If you set this to 'target' instead of a
# numerical value, the color is as for the file pointed to.)
MULTIHARDLINK 00 # regular file with more than one link
FIFO 40;33 # pipe
SOCK 01;35 # socket
DOOR 01;35 # door
BLK 40;33;01 # block device driver
CHR 40;33;01 # character device driver
ORPHAN 40;31;01 # symlink to nonexistent file, or non-stat'able file ...
MISSING 00 # ... and the files they point to
SETUID 37;41 # file that is setuid (u+s)
SETGID 30;43 # file that is setgid (g+s)
CAPABILITY 00 # file with capability (very expensive to lookup)
STICKY_OTHER_WRITABLE 30;42 # dir that is sticky and other-writable (+t,o+w)
OTHER_WRITABLE 34;42 # dir that is other-writable (o+w) and not sticky
STICKY 37;44 # dir with the sticky bit set (+t) and not other-writable
# This is for files with execute permission:
EXEC 01;32
# ===================================================================
# File extension attributes
# ===================================================================
# List any file extensions like '.gz' or '.tar' that you would like ls
# to color below. Put the suffix, a space, and the color init string.
# (and any comments you want to add after a '#').
# Suffixes are matched case insensitively, but if you define different
# init strings for separate cases, those will be honored.
#
# If you use DOS-style suffixes, you may want to uncomment the following:
#.cmd 01;32 # executables (bright green)
#.exe 01;32
#.com 01;32
#.btm 01;32
#.bat 01;32
# Or if you want to color scripts even if they do not have the
# executable bit actually set.
#.sh 01;32
#.csh 01;32
# archives or compressed (bright red)
.tar 01;31
.tgz 01;31
.arc 01;31
.arj 01;31
.taz 01;31
.lha 01;31
.lz4 01;31
.lzh 01;31
.lzma 01;31
.tlz 01;31
.txz 01;31
.tzo 01;31
.t7z 01;31
.zip 01;31
.z 01;31
.dz 01;31
.gz 01;31
.lrz 01;31
.lz 01;31
.lzo 01;31
.xz 01;31
.zst 01;31
.tzst 01;31
.bz2 01;31
.bz 01;31
.tbz 01;31
.tbz2 01;31
.tz 01;31
.deb 01;31
.rpm 01;31
.jar 01;31
.war 01;31
.ear 01;31
.sar 01;31
.rar 01;31
.alz 01;31
.ace 01;31
.zoo 01;31
.cpio 01;31
.7z 01;31
.rz 01;31
.cab 01;31
.wim 01;31
.swm 01;31
.dwm 01;31
.esd 01;31
# image formats
.avif 01;35
.jpg 01;35
.jpeg 01;35
.mjpg 01;35
.mjpeg 01;35
.gif 01;35
.bmp 01;35
.pbm 01;35
.pgm 01;35
.ppm 01;35
.tga 01;35
.xbm 01;35
.xpm 01;35
.tif 01;35
.tiff 01;35
.png 01;35
.svg 01;35
.svgz 01;35
.mng 01;35
.pcx 01;35
.mov 01;35
.mpg 01;35
.mpeg 01;35
.m2v 01;35
.mkv 01;35
.webm 01;35
.webp 01;35
.ogm 01;35
.mp4 01;35
.m4v 01;35
.mp4v 01;35
.vob 01;35
.qt 01;35
.nuv 01;35
.wmv 01;35
.asf 01;35
.rm 01;35
.rmvb 01;35
.flc 01;35
.avi 01;35
.fli 01;35
.flv 01;35
.gl 01;35
.dl 01;35
.xcf 01;35
.xwd 01;35
.yuv 01;35
.cgm 01;35
.emf 01;35
# https://wiki.xiph.org/MIME_Types_and_File_Extensions
.ogv 01;35
.ogx 01;35
# audio formats
.aac 00;36
.au 00;36
.flac 00;36
.m4a 00;36
.mid 00;36
.midi 00;36
.mka 00;36
.mp3 00;36
.mpc 00;36
.ogg 00;36
.ra 00;36
.wav 00;36
# https://wiki.xiph.org/MIME_Types_and_File_Extensions
.oga 00;36
.opus 00;36
.spx 00;36
.xspf 00;36
# backup files
*~ 00;90
*# 00;90
.bak 00;90
.old 00;90
.orig 00;90
.part 00;90
.rej 00;90
.swp 00;90
.tmp 00;90
.dpkg-dist 00;90
.dpkg-old 00;90
.ucf-dist 00;90
.ucf-new 00;90
.ucf-old 00;90
.rpmnew 00;90
.rpmorig 00;90
.rpmsave 00;90
#
# Subsequent TERM or COLORTERM entries, can be used to add / override
# config specific to those matching environment variables.

View File

@@ -1,45 +1,21 @@
# shellcheck shell=bash
#!/usr/bin/env bash
# shellcheck shell=zsh
# vim: filetype=zsh
export DOTFILES="$HOME/.dotfiles"
source "$DOTFILES/scripts/shared.sh"
path_append "$DOTFILES/local/bin"
# Explicitly set XDG folders
# https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
export XDG_DATA_HOME="$HOME/.local/share"
export XDG_CONFIG_HOME="$HOME/.config"
export XDG_DATA_HOME="$HOME/.local/share"
export XDG_STATE_HOME="$HOME/.local/state"
export XDG_BIN_HOME="$HOME/.local/bin" # this one is custom
# History env variables
export HIST_STAMPS="yyyy-mm-dd"
# Larger bash history (allow 32³ entries; default is 500)
export HISTSIZE=32768
export HISTFILESIZE=$HISTSIZE
# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
export HISTCONTROL=ignoreboth
# Make some commands not show up in history
export HISTIGNORE="ls:cd:cd -:pwd:exit:date:* --help"
# And include the parameter for ZSH
export HISTORY_IGNORE="(ls|cd|cd -|pwd|exit|date|* --help)"
# Highlight section titles in manual pages
export LESS_TERMCAP_md="$ORANGE"
# Dont clear the screen after quitting a manual page
export MANPAGER="less -X"
# Always enable colored `grep` output
export GREP_OPTIONS="--color=auto"
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
hash shopt 2> /dev/null && shopt -s checkwinsize
export LC_ALL=fi_FI.utf8
# Antigen configuration
# https://github.com/zsh-users/antigen/wiki/Configuration
export ADOTDIR="$XDG_DATA_HOME/antigen"
export ANTIGEN_SYSTEM_RECEIPT_F=".local/share/antigen/antigen_system_lastupdate"
export ANTIGEN_PLUGIN_RECEIPT_F=".local/share/antigen/antigen_plugin_lastupdate"
# custom variables
export XDG_BIN_HOME="$HOME/.local/bin"
export XDG_CACHE_HOME="$HOME/.cache"
export XDG_RUNTIME_DIR="$HOME/.local/run"
# Homebrew configuration
export HOMEBREW="/opt/homebrew"
@@ -48,96 +24,20 @@ export HOMEBREW_SBIN="$HOMEBREW/sbin"
export HOMEBREW_PKG="$HOMEBREW/opt"
export HOMEBREW_NO_ENV_HINTS=1
export PATH="$XDG_BIN_HOME:$HOMEBREW_BIN:$HOMEBREW_SBIN:/usr/local/sbin:$PATH"
path_append "/usr/local/bin"
path_append "$HOMEBREW_SBIN"
path_append "$HOMEBREW_BIN"
path_append "$XDG_BIN_HOME"
# brew, https://brew.sh
if command -v brew &> /dev/null; then
BREW_PYTHON=$(brew --prefix python)/bin
GNUBIN_DIR=$(brew --prefix coreutils)/libexec/gnubin
BREW_RUBY=$(brew --prefix ruby)/bin
BREW_GEMS=$(gem environment gemdir)/bin
have brew && {
path_append "$(brew --prefix python)/bin"
path_append "$(brew --prefix coreutils)/libexec/gnubin"
path_append "$(brew --prefix ruby)/bin"
path_append "$(gem environment gemdir)/bin"
}
export PATH="$BREW_PYTHON:$GNUBIN_DIR:$BREW_GEMS:$BREW_RUBY:$PATH"
fi
source "$DOTFILES/config/exports-shell"
source "$DOTFILES/config/exports-apps"
# nvm, the node version manager
export NVM_LAZY_LOAD=true
export NVM_COMPLETION=true
export NVM_AUTO_USE=true
export NVM_DIR="${XDG_CONFIG_HOME}/nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
# If we have go packages, include them to the PATH
if command -v go &> /dev/null; then
export GOPATH="$XDG_DATA_HOME/go"
export GOBIN="$XDG_BIN_HOME"
mkdir -p "$GOPATH"
fi
if command -v nvim &> /dev/null; then
export EDITOR="nvim"
fi
# docker, https://docs.docker.com/engine/reference/commandline/cli/
if command -v docker &> /dev/null; then
export DOCKER_CONFIG="$XDG_CONFIG_HOME/docker"
mkdir -p "$DOCKER_CONFIG"
fi
# z, https://github.com/rupa/z
export _Z_DATA="$XDG_STATE_HOME/z"
[[ -f "$XDG_BIN_HOME/z/z.sh" ]] && source "$XDG_BIN_HOME/z/z.sh"
# composer, https://getcomposer.org/
if command -v composer &> /dev/null; then
export COMPOSER_HOME="$XDG_STATE_HOME/composer"
export COMPOSER_BIN="$COMPOSER_HOME/vendor/bin"
export PATH="$COMPOSER_BIN:$PATH"
fi
# gem, rubygems
if command -v gem &> /dev/null; then
export GEM_HOME="$XDG_STATE_HOME/gem"
export GEM_PATH="$XDG_STATE_HOME/gem"
export PATH="$GEM_HOME/bin:$PATH"
fi
# pyenv, python environments
export PYENV_ROOT="$XDG_STATE_HOME/pyenv"
mkdir -p "$PYENV_ROOT"
export PATH="$PYENV_ROOT/bin:$PATH"
if command -v pyenv &> /dev/null; then
eval "$(pyenv init -)"
fi
# wakatime, https://github.com/wakatime/wakatime-cli
export WAKATIME_HOME="$XDG_STATE_HOME/wakatime"
# op (1Password cli) is present
if hash op 2> /dev/null; then
export OP_CACHE="$XDG_STATE_HOME/1password"
mkdir -p "$OP_CACHE"
eval "$(op completion zsh)"
compdef _op op
fi
# Ansible configuration
# https://docs.ansible.com/ansible/latest/reference_appendices/config.html
if hash ansible 2> /dev/null; then
export ANSIBLE_HOME="$XDG_STATE_HOME/ansible"
mkdir -p "$ANSIBLE_HOME"
fi
# gcloud is present
#if hash gcloud 2>/dev/null; then
# GCLOUD_LOC=$(gcloud info --format="value(installation.sdk_root)" --quiet)
# [[ -f "$GCLOUD_LOC/path.zsh.inc" ]] && builtin source "$GCLOUD_LOC/path.zsh.inc"
# [[ -f "$GCLOUD_LOC/completion.zsh.inc" ]] && builtin source "$GCLOUD_LOC/completion.zsh.inc"
#fi
# Load iterm2 shell integration
# https://iterm2.com/documentation-shell-integration.html
[[ -f "$XDG_BIN_HOME/iterm2_shell_integration.zsh" ]] \
&& source "$XDG_BIN_HOME/iterm2_shell_integration.zsh"
have nvim && export EDITOR="nvim"

113
config/exports-apps Executable file
View File

@@ -0,0 +1,113 @@
#!/usr/bin/env bash
# shellcheck shell=bash
# shellcheck enable=external-sources
# shellcheck disable=1091
# vim: filetype=zsh
source "$DOTFILES/scripts/shared.sh"
# Antigen configuration
# https://github.com/zsh-users/antigen/wiki/Configuration
export ADOTDIR="$XDG_DATA_HOME/antigen"
export ANTIGEN_SYSTEM_RECEIPT_F=".local/share/antigen/antigen_system_lastupdate"
export ANTIGEN_PLUGIN_RECEIPT_F=".local/share/antigen/antigen_plugin_lastupdate"
# Ansible configuration
# https://docs.ansible.com/ansible/latest/reference_appendices/config.html
have ansible && {
export ANSIBLE_HOME="$XDG_CONFIG_HOME/ansible"
export ANSIBLE_CONFIG="$XDG_CONFIG_HOME/ansible.cfg"
export ANSIBLE_GALAXY_CACHE_DIR="$XDG_CACHE_HOME/ansible/galaxy_cache"
x-dc "$ANSIBLE_HOME"
x-dc "$ANSIBLE_GALAXY_CACHE_DIR"
}
# composer, https://getcomposer.org/
have composer && {
export COMPOSER_HOME="$XDG_STATE_HOME/composer"
export COMPOSER_BIN="$COMPOSER_HOME/vendor/bin"
export PATH="$COMPOSER_BIN:$PATH"
}
# docker, https://docs.docker.com/engine/reference/commandline/cli/
have docker && {
export DOCKER_CONFIG="$XDG_CONFIG_HOME/docker"
x-dc "$DOCKER_CONFIG"
# Docker: Disable snyk ad
export DOCKER_SCAN_SUGGEST=false
}
# ffmpeg
have ffmpeg && {
export FFMPEG_DATADIR="$XDG_CONFIG_HOME/ffmpeg"
x-dc "$FFMPEG_DATADIR"
}
# gcloud
have gcloud && {
GCLOUD_LOC=$(gcloud info --format="value(installation.sdk_root)" --quiet)
[[ -f "$GCLOUD_LOC/path.zsh.inc" ]] && builtin source "$GCLOUD_LOC/path.zsh.inc"
[[ -f "$GCLOUD_LOC/completion.zsh.inc" ]] && builtin source "$GCLOUD_LOC/completion.zsh.inc"
}
# gem, rubygems
have gem && {
export GEM_HOME="$XDG_STATE_HOME/gem"
export GEM_PATH="$XDG_STATE_HOME/gem"
export PATH="$GEM_HOME/bin:$PATH"
path_append "$GEM_PATH/bin"
}
# If we have go packages, include them to the PATH
have go && {
export GOPATH="$XDG_DATA_HOME/go"
export GOBIN="$XDG_BIN_HOME"
x-dc "$GOPATH"
}
# irssi
have irssi && {
# These variables are used in ./alias with --config and --home
export IRSSI_CONFIG_HOME="$XDG_CONFIG_HOME/irssi"
export IRSSI_CONFIG_FILE="$IRSSI_CONFIG_HOME/config"
x-dc "$IRSSI_CONFIG_HOME"
}
# nvm, the node version manager
export NVM_LAZY_LOAD=true
export NVM_COMPLETION=true
export NVM_AUTO_USE=true
export NVM_DIR="$XDG_CONFIG_HOME/nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
# op (1Password cli) is present
have op && {
export OP_CACHE="$XDG_STATE_HOME/1password"
x-dc "$OP_CACHE"
eval "$(op completion zsh)"
compdef _op op
}
# pyenv, python environments
have pyenv && {
export PYENV_ROOT="$XDG_STATE_HOME/pyenv"
x-dc "$PYENV_ROOT"
path_append "$PYENV_ROOT/bin"
eval "$(pyenv init -)"
}
# wakatime, https://github.com/wakatime/wakatime-cli
export WAKATIME_HOME="$XDG_STATE_HOME/wakatime"
x-dc "$WAKATIME_HOME"
# z, https://github.com/rupa/z
export _Z_DATA="$XDG_STATE_HOME/z"
[[ -f "$XDG_BIN_HOME/z/z.sh" ]] && source "$XDG_BIN_HOME/z/z.sh"
# Misc
export ANDROID_HOME="$XDG_DATA_HOME/android"
export GNUPGHOME="$XDG_DATA_HOME/gnupg"
export SCREENRC="$XDG_CONFIG_HOME/misc/screenrc"
export TMUX_CONF="$DOTFILES/config/tmux/tmux.conf"
export BAT_THEME="ansi"

View File

@@ -0,0 +1,6 @@
#!/usr/bin/env bash
#
# This file is secret and wont be added to the git repo.
export GITLAB_API_TOKEN=""
export GREN_GITHUB_TOKEN=""

63
config/exports-shell Executable file
View File

@@ -0,0 +1,63 @@
#!/usr/bin/env bash
# shellcheck shell=bash
# shellcheck disable=1091,2046
# vim: filetype=zsh
source "$DOTFILES/scripts/shared.sh"
export LC_ALL=fi_FI.utf8
# Bash completion file location
export BASH_COMPLETION_USER_FILE="${XDG_CONFIG_HOME}/bash-completion/bash_completion"
# History env variables
export HIST_STAMPS="yyyy-mm-dd"
# Larger bash history (allow 32³ entries; default is 500)
export HISTSIZE=32768
export HISTFILESIZE=$HISTSIZE
# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
export HISTCONTROL=ignoreboth
# Make some commands not show up in history
export HISTIGNORE="ls:cd:cd -:pwd:exit:date:* --help"
# And include the parameter for ZSH
export HISTORY_IGNORE="(ls|cd|cd -|pwd|exit|date|* --help)"
# Highlight section titles in manual pages
export LESS_TERMCAP_md="$ORANGE"
# Dont clear the screen after quitting a manual page
export MANPAGER="less -X"
# Always enable colored `grep` output
export GREP_OPTIONS="--color=auto"
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
hash shopt 2> /dev/null && shopt -s checkwinsize
# Load iterm2 shell integration
# https://iterm2.com/documentation-shell-integration.html
[[ -f "$XDG_BIN_HOME/iterm2_shell_integration.zsh" ]] \
&& source "$XDG_BIN_HOME/iterm2_shell_integration.zsh"
# Set dircolors based on the file, if it exists
have dircolors && eval $(dircolors "$XDG_CONFIG_HOME/dircolors")
# If we are using zsh, color our dir lists and such
if [ "$SHELL" = "$(which zsh)" ]; then
x-dc "$XDG_CACHE_HOME/zsh"
x-dc "$XDG_STATE_HOME/zsh"
export HISTFILE="$XDG_STATE_HOME/zsh/history"
zstyle ':completion:*' cache-path "$XDG_CACHE_HOME/zsh/zcompcache"
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

View File

@@ -2,9 +2,11 @@
#
# shell functions
#
# shellcheck source="../scripts/shared.sh"
source "$DOTFILES/scripts/shared.sh"
# Weather in Tampere, or other city
function weather
weather()
{
# https://github.com/chubin/wttr.in#usage
local city="${1:-Tampere}"
@@ -12,25 +14,25 @@ function weather
}
# Docker
function ssh-docker
ssh-docker()
{
docker exec -it "$@" bash
}
# Create a new directory and enter it
function mkd
mkd()
{
mkdir -p "$@" && cd "$@" || exit
}
# All the dig info
function digga
digga()
{
dig +nocmd "$1" any +multiline +noall +answer
}
# Rector project to php version 8.0 by default.
function rector
rector()
{
local php="${1:-80}"
docker run -v "$(pwd)":/project rector/rector:latest process \
@@ -40,7 +42,7 @@ function rector
}
# Commit everything
function commit
commit()
{
commitMessage="$*"
@@ -52,7 +54,7 @@ function commit
eval "git commit -a -m '${commitMessage}'"
}
function scheduler
scheduler()
{
while :; do
php artisan schedule:run
@@ -61,13 +63,26 @@ function scheduler
done
}
function silent
silent()
{
"$@" >&/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
function x-default-antigen-bundles
x-default-antigen-bundles()
{
# these should be always available
antigen bundle colored-man-pages
@@ -81,13 +96,12 @@ function x-default-antigen-bundles
antigen bundle zsh-users/zsh-syntax-highlighting
# these should be available if there's need
hash git 2> /dev/null && antigen bundle git
hash brew 2> /dev/null && antigen bundle brew
hash docker 2> /dev/null && antigen bundle docker
hash docker-compose 2> /dev/null && antigen bundle sroze/docker-compose-zsh-plugin
hash jq 2> /dev/null && antigen bundle reegnz/jq-zsh-plugin
hash nvm 2> /dev/null && antigen bundle nvm
hash php 2> /dev/null && antigen bundle php
hash python 2> /dev/null && antigen bundle MichaelAquilina/zsh-autoswitch-virtualenv
hash rvm 2> /dev/null && antigen bundle unixorn/rvm-plugin
have brew && antigen bundle brew
have docker && antigen bundle docker
have docker-compose && antigen bundle sroze/docker-compose-zsh-plugin
have jq && antigen bundle reegnz/jq-zsh-plugin
have nvm && antigen bundle nvm
have php && antigen bundle php
have python && antigen bundle MichaelAquilina/zsh-autoswitch-virtualenv
have rvm && antigen bundle unixorn/rvm-plugin
}

13
config/fzf/fzf.bash Normal file
View File

@@ -0,0 +1,13 @@
# Setup fzf
# ---------
if [[ ! "$PATH" == */Users/ivuorinen/.config/fzf/bin* ]]; then
PATH="${PATH:+${PATH}:}/Users/ivuorinen/.config/fzf/bin"
fi
# Auto-completion
# ---------------
[[ $- == *i* ]] && source "/Users/ivuorinen/.config/fzf/shell/completion.bash" 2> /dev/null
# Key bindings
# ------------
source "/Users/ivuorinen/.config/fzf/shell/key-bindings.bash"

13
config/fzf/fzf.zsh Normal file
View File

@@ -0,0 +1,13 @@
# Setup fzf
# ---------
if [[ ! "$PATH" == */Users/ivuorinen/.config/fzf/bin* ]]; then
PATH="${PATH:+${PATH}:}/Users/ivuorinen/.config/fzf/bin"
fi
# Auto-completion
# ---------------
[[ $- == *i* ]] && source "/Users/ivuorinen/.config/fzf/shell/completion.zsh" 2> /dev/null
# Key bindings
# ------------
source "/Users/ivuorinen/.config/fzf/shell/key-bindings.zsh"

View File

@@ -0,0 +1,331 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.27058823529411763</real>
<key>Green Component</key>
<real>0.2784313725490196</real>
<key>Blue Component</key>
<real>0.35294117647058826</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
<key>Ansi 1 Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.9529411764705882</real>
<key>Green Component</key>
<real>0.5450980392156862</real>
<key>Blue Component</key>
<real>0.6588235294117647</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
<key>Ansi 2 Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.6509803921568628</real>
<key>Green Component</key>
<real>0.8901960784313725</real>
<key>Blue Component</key>
<real>0.6313725490196078</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
<key>Ansi 3 Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.9764705882352941</real>
<key>Green Component</key>
<real>0.8862745098039215</real>
<key>Blue Component</key>
<real>0.6862745098039216</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
<key>Ansi 4 Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.5372549019607843</real>
<key>Green Component</key>
<real>0.7058823529411765</real>
<key>Blue Component</key>
<real>0.9803921568627451</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
<key>Ansi 5 Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.9607843137254902</real>
<key>Green Component</key>
<real>0.7607843137254902</real>
<key>Blue Component</key>
<real>0.9058823529411765</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
<key>Ansi 6 Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.5803921568627451</real>
<key>Green Component</key>
<real>0.8862745098039215</real>
<key>Blue Component</key>
<real>0.8352941176470589</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
<key>Ansi 7 Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.7294117647058823</real>
<key>Green Component</key>
<real>0.7607843137254902</real>
<key>Blue Component</key>
<real>0.8705882352941177</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
<key>Ansi 8 Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.34509803921568627</real>
<key>Green Component</key>
<real>0.3568627450980392</real>
<key>Blue Component</key>
<real>0.4392156862745098</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
<key>Ansi 9 Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.9529411764705882</real>
<key>Green Component</key>
<real>0.5450980392156862</real>
<key>Blue Component</key>
<real>0.6588235294117647</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
<key>Ansi 10 Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.6509803921568628</real>
<key>Green Component</key>
<real>0.8901960784313725</real>
<key>Blue Component</key>
<real>0.6313725490196078</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
<key>Ansi 11 Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.9764705882352941</real>
<key>Green Component</key>
<real>0.8862745098039215</real>
<key>Blue Component</key>
<real>0.6862745098039216</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
<key>Ansi 12 Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.5372549019607843</real>
<key>Green Component</key>
<real>0.7058823529411765</real>
<key>Blue Component</key>
<real>0.9803921568627451</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
<key>Ansi 13 Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.9607843137254902</real>
<key>Green Component</key>
<real>0.7607843137254902</real>
<key>Blue Component</key>
<real>0.9058823529411765</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
<key>Ansi 14 Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.5803921568627451</real>
<key>Green Component</key>
<real>0.8862745098039215</real>
<key>Blue Component</key>
<real>0.8352941176470589</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
<key>Ansi 15 Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.6509803921568628</real>
<key>Green Component</key>
<real>0.6784313725490196</real>
<key>Blue Component</key>
<real>0.7843137254901961</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
<key>Background Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.11764705882352941</real>
<key>Green Component</key>
<real>0.11764705882352941</real>
<key>Blue Component</key>
<real>0.1803921568627451</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
<key>Foreground Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.803921568627451</real>
<key>Green Component</key>
<real>0.8392156862745098</real>
<key>Blue Component</key>
<real>0.9568627450980393</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
<key>Link Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.5372549019607843</real>
<key>Green Component</key>
<real>0.8627450980392157</real>
<key>Blue Component</key>
<real>0.9215686274509803</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
<key>Bold Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.803921568627451</real>
<key>Green Component</key>
<real>0.8392156862745098</real>
<key>Blue Component</key>
<real>0.9568627450980393</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
<key>Cursor Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.9607843137254902</real>
<key>Green Component</key>
<real>0.8784313725490196</real>
<key>Blue Component</key>
<real>0.8627450980392157</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
<key>Cursor Text Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.803921568627451</real>
<key>Green Component</key>
<real>0.8392156862745098</real>
<key>Blue Component</key>
<real>0.9568627450980393</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
<key>Cursor Guide Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.803921568627451</real>
<key>Green Component</key>
<real>0.8392156862745098</real>
<key>Blue Component</key>
<real>0.9568627450980393</real>
<key>Alpha Component</key>
<real>0.07</real>
</dict>
<key>Selection Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.34509803921568627</real>
<key>Green Component</key>
<real>0.3568627450980392</real>
<key>Blue Component</key>
<real>0.4392156862745098</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
<key>Selected Text Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.803921568627451</real>
<key>Green Component</key>
<real>0.8392156862745098</real>
<key>Blue Component</key>
<real>0.9568627450980393</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
</dict>
</plist>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,417 @@
{
"Badge Text" : "",
"Working Directory" : "\/Users\/ivuorinen\/Code",
"Prompt Before Closing 2" : false,
"Selected Text Color" : {
"Red Component" : 0.80392156862745101,
"Color Space" : "sRGB",
"Blue Component" : 0.95686274509803926,
"Alpha Component" : 1,
"Green Component" : 0.83921568627450982
},
"Rows" : 25,
"Ansi 11 Color" : {
"Red Component" : 0.97647058823529409,
"Color Space" : "sRGB",
"Blue Component" : 0.68627450980392157,
"Alpha Component" : 1,
"Green Component" : 0.88627450980392153
},
"Use Italic Font" : true,
"Foreground Color" : {
"Red Component" : 0.80392156862745101,
"Color Space" : "sRGB",
"Blue Component" : 0.95686274509803926,
"Alpha Component" : 1,
"Green Component" : 0.83921568627450982
},
"Right Option Key Sends" : 0,
"Character Encoding" : 4,
"Selection Color" : {
"Red Component" : 0.34509803921568627,
"Color Space" : "sRGB",
"Blue Component" : 0.4392156862745098,
"Alpha Component" : 1,
"Green Component" : 0.35686274509803922
},
"Blend" : 0.24709154211956524,
"Mouse Reporting" : true,
"Cursor Boost" : 0,
"Ansi 4 Color" : {
"Red Component" : 0.53725490196078429,
"Color Space" : "sRGB",
"Blue Component" : 0.98039215686274506,
"Alpha Component" : 1,
"Green Component" : 0.70588235294117652
},
"Non-ASCII Anti Aliased" : true,
"Sync Title" : false,
"Badge Font" : "JetBrainsMonoNerdFontCompleteM-Bold",
"Disable Window Resizing" : true,
"Description" : "Default",
"Close Sessions On End" : true,
"Jobs to Ignore" : [
"rlogin",
"ssh",
"slogin",
"telnet"
],
"Scrollback Lines" : 0,
"Draw Powerline Glyphs" : true,
"Flashing Bell" : true,
"Cursor Guide Color" : {
"Red Component" : 0.80392156862745101,
"Color Space" : "sRGB",
"Blue Component" : 0.95686274509803926,
"Alpha Component" : 0.070000000000000007,
"Green Component" : 0.83921568627450982
},
"BM Growl" : true,
"Ansi 3 Color" : {
"Red Component" : 0.97647058823529409,
"Color Space" : "sRGB",
"Blue Component" : 0.68627450980392157,
"Alpha Component" : 1,
"Green Component" : 0.88627450980392153
},
"Icon" : 1,
"Use Non-ASCII Font" : false,
"Link Color" : {
"Red Component" : 0.53725490196078429,
"Color Space" : "sRGB",
"Blue Component" : 0.92156862745098034,
"Alpha Component" : 1,
"Green Component" : 0.86274509803921573
},
"Shortcut" : "",
"Background Image Location" : "",
"Bold Color" : {
"Red Component" : 0.80392156862745101,
"Color Space" : "sRGB",
"Blue Component" : 0.95686274509803926,
"Alpha Component" : 1,
"Green Component" : 0.83921568627450982
},
"Use Cursor Guide" : false,
"Unlimited Scrollback" : true,
"Custom Command" : "No",
"Title Components" : 512,
"Keyboard Map" : {
"0xf700-0x260000" : {
"Action" : 10,
"Text" : "[1;6A"
},
"0x37-0x40000" : {
"Action" : 11,
"Text" : "0x1f"
},
"0x32-0x40000" : {
"Action" : 11,
"Text" : "0x00"
},
"0xf709-0x20000" : {
"Action" : 10,
"Text" : "[17;2~"
},
"0xf70c-0x20000" : {
"Action" : 10,
"Text" : "[20;2~"
},
"0xf729-0x20000" : {
"Action" : 10,
"Text" : "[1;2H"
},
"0xf72b-0x40000" : {
"Action" : 10,
"Text" : "[1;5F"
},
"0xf705-0x20000" : {
"Action" : 10,
"Text" : "[1;2Q"
},
"0xf703-0x260000" : {
"Action" : 10,
"Text" : "[1;6C"
},
"0xf700-0x220000" : {
"Action" : 10,
"Text" : "[1;2A"
},
"0xf701-0x280000" : {
"Action" : 11,
"Text" : "0x1b 0x1b 0x5b 0x42"
},
"0x38-0x40000" : {
"Action" : 11,
"Text" : "0x7f"
},
"0x33-0x40000" : {
"Action" : 11,
"Text" : "0x1b"
},
"0xf703-0x220000" : {
"Action" : 10,
"Text" : "[1;2C"
},
"0xf701-0x240000" : {
"Action" : 10,
"Text" : "[1;5B"
},
"0xf70d-0x20000" : {
"Action" : 10,
"Text" : "[21;2~"
},
"0xf702-0x260000" : {
"Action" : 10,
"Text" : "[1;6D"
},
"0xf729-0x40000" : {
"Action" : 10,
"Text" : "[1;5H"
},
"0xf706-0x20000" : {
"Action" : 10,
"Text" : "[1;2R"
},
"0x34-0x40000" : {
"Action" : 11,
"Text" : "0x1c"
},
"0xf700-0x280000" : {
"Action" : 11,
"Text" : "0x1b 0x1b 0x5b 0x41"
},
"0x2d-0x40000" : {
"Action" : 11,
"Text" : "0x1f"
},
"0xf70e-0x20000" : {
"Action" : 10,
"Text" : "[23;2~"
},
"0xf702-0x220000" : {
"Action" : 10,
"Text" : "[1;2D"
},
"0xf703-0x280000" : {
"Action" : 11,
"Text" : "0x1b 0x1b 0x5b 0x43"
},
"0xf700-0x240000" : {
"Action" : 10,
"Text" : "[1;5A"
},
"0xf707-0x20000" : {
"Action" : 10,
"Text" : "[1;2S"
},
"0xf70a-0x20000" : {
"Action" : 10,
"Text" : "[18;2~"
},
"0x35-0x40000" : {
"Action" : 11,
"Text" : "0x1d"
},
"0xf70f-0x20000" : {
"Action" : 10,
"Text" : "[24;2~"
},
"0xf703-0x240000" : {
"Action" : 10,
"Text" : "[1;5C"
},
"0xf701-0x260000" : {
"Action" : 10,
"Text" : "[1;6B"
},
"0xf702-0x280000" : {
"Action" : 11,
"Text" : "0x1b 0x1b 0x5b 0x44"
},
"0xf72b-0x20000" : {
"Action" : 10,
"Text" : "[1;2F"
},
"0x36-0x40000" : {
"Action" : 11,
"Text" : "0x1e"
},
"0xf708-0x20000" : {
"Action" : 10,
"Text" : "[15;2~"
},
"0xf701-0x220000" : {
"Action" : 10,
"Text" : "[1;2B"
},
"0xf70b-0x20000" : {
"Action" : 10,
"Text" : "[19;2~"
},
"0xf702-0x240000" : {
"Action" : 10,
"Text" : "[1;5D"
},
"0xf704-0x20000" : {
"Action" : 10,
"Text" : "[1;2P"
}
},
"Ansi 14 Color" : {
"Red Component" : 0.58039215686274515,
"Color Space" : "sRGB",
"Blue Component" : 0.83529411764705885,
"Alpha Component" : 1,
"Green Component" : 0.88627450980392153
},
"Ansi 2 Color" : {
"Red Component" : 0.65098039215686276,
"Color Space" : "sRGB",
"Blue Component" : 0.63137254901960782,
"Alpha Component" : 1,
"Green Component" : 0.8901960784313725
},
"Send Code When Idle" : false,
"ASCII Anti Aliased" : true,
"Tags" : [
],
"Ansi 9 Color" : {
"Red Component" : 0.95294117647058818,
"Color Space" : "sRGB",
"Blue Component" : 0.6588235294117647,
"Alpha Component" : 1,
"Green Component" : 0.54509803921568623
},
"Badge Right Margin" : 10,
"Use Bold Font" : true,
"Silence Bell" : false,
"Ansi 12 Color" : {
"Red Component" : 0.53725490196078429,
"Color Space" : "sRGB",
"Blue Component" : 0.98039215686274506,
"Alpha Component" : 1,
"Green Component" : 0.70588235294117652
},
"Window Type" : 0,
"Use Bright Bold" : true,
"Cursor Text Color" : {
"Red Component" : 0.80392156862745101,
"Color Space" : "sRGB",
"Blue Component" : 0.95686274509803926,
"Alpha Component" : 1,
"Green Component" : 0.83921568627450982
},
"Default Bookmark" : "No",
"Cursor Color" : {
"Red Component" : 0.96078431372549022,
"Color Space" : "sRGB",
"Blue Component" : 0.86274509803921573,
"Alpha Component" : 1,
"Green Component" : 0.8784313725490196
},
"Ansi 1 Color" : {
"Red Component" : 0.95294117647058818,
"Color Space" : "sRGB",
"Blue Component" : 0.6588235294117647,
"Alpha Component" : 1,
"Green Component" : 0.54509803921568623
},
"Name" : "Default",
"Blinking Cursor" : false,
"Guid" : "82636119-EA17-4A26-9AA7-408172F4A9C8",
"Badge Max Width" : 0.45000000000000001,
"Idle Code" : 0,
"Ansi 10 Color" : {
"Red Component" : 0.65098039215686276,
"Color Space" : "sRGB",
"Blue Component" : 0.63137254901960782,
"Alpha Component" : 1,
"Green Component" : 0.8901960784313725
},
"Ansi 8 Color" : {
"Red Component" : 0.34509803921568627,
"Color Space" : "sRGB",
"Blue Component" : 0.4392156862745098,
"Alpha Component" : 1,
"Green Component" : 0.35686274509803922
},
"Badge Color" : {
"Red Component" : 1,
"Color Space" : "sRGB",
"Blue Component" : 0,
"Alpha Component" : 0.5,
"Green Component" : 0.14910030364990234
},
"Smart Cursor Color" : true,
"Ambiguous Double Width" : false,
"Blur Radius" : 9.5927277260638313,
"Badge Max Height" : 0.10000000000000001,
"Ansi 0 Color" : {
"Red Component" : 0.27058823529411763,
"Color Space" : "sRGB",
"Blue Component" : 0.35294117647058826,
"Alpha Component" : 1,
"Green Component" : 0.27843137254901962
},
"Blur" : true,
"Normal Font" : "JetBrainsMonoNerdFontCompleteM-Light 15",
"Vertical Spacing" : 1,
"Ansi 7 Color" : {
"Red Component" : 0.72941176470588232,
"Color Space" : "sRGB",
"Blue Component" : 0.87058823529411766,
"Alpha Component" : 1,
"Green Component" : 0.76078431372549016
},
"Command" : "",
"Terminal Type" : "xterm-256color",
"Horizontal Spacing" : 1,
"Option Key Sends" : 0,
"Only The Default BG Color Uses Transparency" : true,
"Minimum Contrast" : 0.14973958333333334,
"Ansi 15 Color" : {
"Red Component" : 0.65098039215686276,
"Color Space" : "sRGB",
"Blue Component" : 0.78431372549019607,
"Alpha Component" : 1,
"Green Component" : 0.67843137254901964
},
"Ansi 6 Color" : {
"Red Component" : 0.58039215686274515,
"Color Space" : "sRGB",
"Blue Component" : 0.83529411764705885,
"Alpha Component" : 1,
"Green Component" : 0.88627450980392153
},
"Badge Top Margin" : 10,
"Transparency" : 0.10293218085106381,
"Background Color" : {
"Red Component" : 0.11764705882352941,
"Color Space" : "sRGB",
"Blue Component" : 0.1803921568627451,
"Alpha Component" : 1,
"Green Component" : 0.11764705882352941
},
"Screen" : -2,
"Non Ascii Font" : "Monaco 12",
"Ansi 13 Color" : {
"Red Component" : 0.96078431372549022,
"Color Space" : "sRGB",
"Blue Component" : 0.90588235294117647,
"Alpha Component" : 1,
"Green Component" : 0.76078431372549016
},
"Columns" : 120,
"Visual Bell" : true,
"ASCII Ligatures" : false,
"Ansi 5 Color" : {
"Red Component" : 0.96078431372549022,
"Color Space" : "sRGB",
"Blue Component" : 0.90588235294117647,
"Alpha Component" : 1,
"Green Component" : 0.76078431372549016
},
"Custom Directory" : "Yes"
}

16
config/misc/screenrc Normal file
View File

@@ -0,0 +1,16 @@
# Disable the startup message
startup_message off
# Set a large scrollback buffer
defscrollback 32000
# Always start `screen` with UTF-8 enabled (`screen -U`)
defutf8 on
# Scroll with mouse wheel (http://stackoverflow.com/a/1125947)
termcapinfo xterm* ti@:te@
# Some settings for screen + vim
term xterm-256color
maptimeout 10

864
config/neofetch/config.conf Normal file
View File

@@ -0,0 +1,864 @@
# See this wiki page for more info:
# https://github.com/dylanaraps/neofetch/wiki/Customizing-Info
print_info() {
info title
info underline
info "OS" distro
info "Host" model
# info "Kernel" kernel
info "Uptime" uptime
# info "Packages" packages
info "Shell" shell
info "Resolution" resolution
# info "DE" de
# info "WM" wm
# info "WM Theme" wm_theme
info "Theme" theme
info "Icons" icons
info "Terminal" term
info "Terminal Font" term_font
info "CPU" cpu
info "GPU" gpu
info "Memory" memory
# info "GPU Driver" gpu_driver # Linux/macOS only
# info "CPU Usage" cpu_usage
# info "Disk" disk
# info "Battery" battery
# info "Font" font
# info "Song" song
# [[ "$player" ]] && prin "Music Player" "$player"
info "Local IP" local_ip
# info "Public IP" public_ip
# info "Users" users
info "Locale" locale # This only works on glibc systems.
info cols
}
# Title
# Hide/Show Fully qualified domain name.
#
# Default: 'off'
# Values: 'on', 'off'
# Flag: --title_fqdn
title_fqdn="off"
# Kernel
# Shorten the output of the kernel function.
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --kernel_shorthand
# Supports: Everything except *BSDs (except PacBSD and PC-BSD)
#
# Example:
# on: '4.8.9-1-ARCH'
# off: 'Linux 4.8.9-1-ARCH'
kernel_shorthand="on"
# Distro
# Shorten the output of the distro function
#
# Default: 'off'
# Values: 'on', 'tiny', 'off'
# Flag: --distro_shorthand
# Supports: Everything except Windows and Haiku
distro_shorthand="on"
# Show/Hide OS Architecture.
# Show 'x86_64', 'x86' and etc in 'Distro:' output.
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --os_arch
#
# Example:
# on: 'Arch Linux x86_64'
# off: 'Arch Linux'
os_arch="on"
# Uptime
# Shorten the output of the uptime function
#
# Default: 'on'
# Values: 'on', 'tiny', 'off'
# Flag: --uptime_shorthand
#
# Example:
# on: '2 days, 10 hours, 3 mins'
# tiny: '2d 10h 3m'
# off: '2 days, 10 hours, 3 minutes'
uptime_shorthand="tiny"
# Memory
# Show memory pecentage in output.
#
# Default: 'off'
# Values: 'on', 'off'
# Flag: --memory_percent
#
# Example:
# on: '1801MiB / 7881MiB (22%)'
# off: '1801MiB / 7881MiB'
memory_percent="on"
# Change memory output unit.
#
# Default: 'mib'
# Values: 'kib', 'mib', 'gib'
# Flag: --memory_unit
#
# Example:
# kib '1020928KiB / 7117824KiB'
# mib '1042MiB / 6951MiB'
# gib: ' 0.98GiB / 6.79GiB'
memory_unit="gib"
# Packages
# Show/Hide Package Manager names.
#
# Default: 'tiny'
# Values: 'on', 'tiny' 'off'
# Flag: --package_managers
#
# Example:
# on: '998 (pacman), 8 (flatpak), 4 (snap)'
# tiny: '908 (pacman, flatpak, snap)'
# off: '908'
package_managers="on"
# Shell
# Show the path to $SHELL
#
# Default: 'off'
# Values: 'on', 'off'
# Flag: --shell_path
#
# Example:
# on: '/bin/bash'
# off: 'bash'
shell_path="off"
# Show $SHELL version
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --shell_version
#
# Example:
# on: 'bash 4.4.5'
# off: 'bash'
shell_version="on"
# CPU
# CPU speed type
#
# Default: 'bios_limit'
# Values: 'scaling_cur_freq', 'scaling_min_freq', 'scaling_max_freq', 'bios_limit'.
# Flag: --speed_type
# Supports: Linux with 'cpufreq'
# NOTE: Any file in '/sys/devices/system/cpu/cpu0/cpufreq' can be used as a value.
speed_type="bios_limit"
# CPU speed shorthand
#
# Default: 'off'
# Values: 'on', 'off'.
# Flag: --speed_shorthand
# NOTE: This flag is not supported in systems with CPU speed less than 1 GHz
#
# Example:
# on: 'i7-6500U (4) @ 3.1GHz'
# off: 'i7-6500U (4) @ 3.100GHz'
speed_shorthand="off"
# Enable/Disable CPU brand in output.
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --cpu_brand
#
# Example:
# on: 'Intel i7-6500U'
# off: 'i7-6500U (4)'
cpu_brand="on"
# CPU Speed
# Hide/Show CPU speed.
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --cpu_speed
#
# Example:
# on: 'Intel i7-6500U (4) @ 3.1GHz'
# off: 'Intel i7-6500U (4)'
cpu_speed="on"
# CPU Cores
# Display CPU cores in output
#
# Default: 'logical'
# Values: 'logical', 'physical', 'off'
# Flag: --cpu_cores
# Support: 'physical' doesn't work on BSD.
#
# Example:
# logical: 'Intel i7-6500U (4) @ 3.1GHz' (All virtual cores)
# physical: 'Intel i7-6500U (2) @ 3.1GHz' (All physical cores)
# off: 'Intel i7-6500U @ 3.1GHz'
cpu_cores="logical"
# CPU Temperature
# Hide/Show CPU temperature.
# Note the temperature is added to the regular CPU function.
#
# Default: 'off'
# Values: 'C', 'F', 'off'
# Flag: --cpu_temp
# Supports: Linux, BSD
# NOTE: For FreeBSD and NetBSD-based systems, you'll need to enable
# coretemp kernel module. This only supports newer Intel processors.
#
# Example:
# C: 'Intel i7-6500U (4) @ 3.1GHz [27.2°C]'
# F: 'Intel i7-6500U (4) @ 3.1GHz [82.0°F]'
# off: 'Intel i7-6500U (4) @ 3.1GHz'
cpu_temp="off"
# GPU
# Enable/Disable GPU Brand
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --gpu_brand
#
# Example:
# on: 'AMD HD 7950'
# off: 'HD 7950'
gpu_brand="on"
# Which GPU to display
#
# Default: 'all'
# Values: 'all', 'dedicated', 'integrated'
# Flag: --gpu_type
# Supports: Linux
#
# Example:
# all:
# GPU1: AMD HD 7950
# GPU2: Intel Integrated Graphics
#
# dedicated:
# GPU1: AMD HD 7950
#
# integrated:
# GPU1: Intel Integrated Graphics
gpu_type="all"
# Resolution
# Display refresh rate next to each monitor
# Default: 'off'
# Values: 'on', 'off'
# Flag: --refresh_rate
# Supports: Doesn't work on Windows.
#
# Example:
# on: '1920x1080 @ 60Hz'
# off: '1920x1080'
refresh_rate="off"
# Gtk Theme / Icons / Font
# Shorten output of GTK Theme / Icons / Font
#
# Default: 'off'
# Values: 'on', 'off'
# Flag: --gtk_shorthand
#
# Example:
# on: 'Numix, Adwaita'
# off: 'Numix [GTK2], Adwaita [GTK3]'
gtk_shorthand="off"
# Enable/Disable gtk2 Theme / Icons / Font
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --gtk2
#
# Example:
# on: 'Numix [GTK2], Adwaita [GTK3]'
# off: 'Adwaita [GTK3]'
gtk2="on"
# Enable/Disable gtk3 Theme / Icons / Font
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --gtk3
#
# Example:
# on: 'Numix [GTK2], Adwaita [GTK3]'
# off: 'Numix [GTK2]'
gtk3="on"
# IP Address
# Website to ping for the public IP
#
# Default: 'http://ident.me'
# Values: 'url'
# Flag: --ip_host
public_ip_host="http://ident.me"
# Public IP timeout.
#
# Default: '2'
# Values: 'int'
# Flag: --ip_timeout
public_ip_timeout=2
# Desktop Environment
# Show Desktop Environment version
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --de_version
de_version="on"
# Disk
# Which disks to display.
# The values can be any /dev/sdXX, mount point or directory.
# NOTE: By default we only show the disk info for '/'.
#
# Default: '/'
# Values: '/', '/dev/sdXX', '/path/to/drive'.
# Flag: --disk_show
#
# Example:
# disk_show=('/' '/dev/sdb1'):
# 'Disk (/): 74G / 118G (66%)'
# 'Disk (/mnt/Videos): 823G / 893G (93%)'
#
# disk_show=('/'):
# 'Disk (/): 74G / 118G (66%)'
#
disk_show=('/')
# Disk subtitle.
# What to append to the Disk subtitle.
#
# Default: 'mount'
# Values: 'mount', 'name', 'dir', 'none'
# Flag: --disk_subtitle
#
# Example:
# name: 'Disk (/dev/sda1): 74G / 118G (66%)'
# 'Disk (/dev/sdb2): 74G / 118G (66%)'
#
# mount: 'Disk (/): 74G / 118G (66%)'
# 'Disk (/mnt/Local Disk): 74G / 118G (66%)'
# 'Disk (/mnt/Videos): 74G / 118G (66%)'
#
# dir: 'Disk (/): 74G / 118G (66%)'
# 'Disk (Local Disk): 74G / 118G (66%)'
# 'Disk (Videos): 74G / 118G (66%)'
#
# none: 'Disk: 74G / 118G (66%)'
# 'Disk: 74G / 118G (66%)'
# 'Disk: 74G / 118G (66%)'
disk_subtitle="mount"
# Disk percent.
# Show/Hide disk percent.
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --disk_percent
#
# Example:
# on: 'Disk (/): 74G / 118G (66%)'
# off: 'Disk (/): 74G / 118G'
disk_percent="on"
# Song
# Manually specify a music player.
#
# Default: 'auto'
# Values: 'auto', 'player-name'
# Flag: --music_player
#
# Available values for 'player-name':
#
# amarok
# audacious
# banshee
# bluemindo
# clementine
# cmus
# deadbeef
# deepin-music
# dragon
# elisa
# exaile
# gnome-music
# gmusicbrowser
# gogglesmm
# guayadeque
# io.elementary.music
# iTunes
# juk
# lollypop
# mocp
# mopidy
# mpd
# muine
# netease-cloud-music
# olivia
# playerctl
# pogo
# pragha
# qmmp
# quodlibet
# rhythmbox
# sayonara
# smplayer
# spotify
# strawberry
# tauonmb
# tomahawk
# vlc
# xmms2d
# xnoise
# yarock
music_player="auto"
# Format to display song information.
#
# Default: '%artist% - %album% - %title%'
# Values: '%artist%', '%album%', '%title%'
# Flag: --song_format
#
# Example:
# default: 'Song: Jet - Get Born - Sgt Major'
song_format="%artist% - %album% - %title%"
# Print the Artist, Album and Title on separate lines
#
# Default: 'off'
# Values: 'on', 'off'
# Flag: --song_shorthand
#
# Example:
# on: 'Artist: The Fratellis'
# 'Album: Costello Music'
# 'Song: Chelsea Dagger'
#
# off: 'Song: The Fratellis - Costello Music - Chelsea Dagger'
song_shorthand="off"
# 'mpc' arguments (specify a host, password etc).
#
# Default: ''
# Example: mpc_args=(-h HOST -P PASSWORD)
mpc_args=()
# Text Colors
# Text Colors
#
# Default: 'distro'
# Values: 'distro', 'num' 'num' 'num' 'num' 'num' 'num'
# Flag: --colors
#
# Each number represents a different part of the text in
# this order: 'title', '@', 'underline', 'subtitle', 'colon', 'info'
#
# Example:
# colors=(distro) - Text is colored based on Distro colors.
# colors=(4 6 1 8 8 6) - Text is colored in the order above.
colors=(distro)
# Text Options
# Toggle bold text
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --bold
bold="on"
# Enable/Disable Underline
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --underline
underline_enabled="on"
# Underline character
#
# Default: '-'
# Values: 'string'
# Flag: --underline_char
underline_char="-"
# Info Separator
# Replace the default separator with the specified string.
#
# Default: ':'
# Flag: --separator
#
# Example:
# separator="->": 'Shell-> bash'
# separator=" =": 'WM = dwm'
separator=":"
# Color Blocks
# Color block range
# The range of colors to print.
#
# Default: '0', '15'
# Values: 'num'
# Flag: --block_range
#
# Example:
#
# Display colors 0-7 in the blocks. (8 colors)
# neofetch --block_range 0 7
#
# Display colors 0-15 in the blocks. (16 colors)
# neofetch --block_range 0 15
block_range=(0 15)
# Toggle color blocks
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --color_blocks
color_blocks="on"
# Color block width in spaces
#
# Default: '3'
# Values: 'num'
# Flag: --block_width
block_width=3
# Color block height in lines
#
# Default: '1'
# Values: 'num'
# Flag: --block_height
block_height=1
# Color Alignment
#
# Default: 'auto'
# Values: 'auto', 'num'
# Flag: --col_offset
#
# Number specifies how far from the left side of the terminal (in spaces) to
# begin printing the columns, in case you want to e.g. center them under your
# text.
# Example:
# col_offset="auto" - Default behavior of neofetch
# col_offset=7 - Leave 7 spaces then print the colors
col_offset="auto"
# Progress Bars
# Bar characters
#
# Default: '-', '='
# Values: 'string', 'string'
# Flag: --bar_char
#
# Example:
# neofetch --bar_char 'elapsed' 'total'
# neofetch --bar_char '-' '='
bar_char_elapsed="-"
bar_char_total="="
# Toggle Bar border
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --bar_border
bar_border="on"
# Progress bar length in spaces
# Number of chars long to make the progress bars.
#
# Default: '15'
# Values: 'num'
# Flag: --bar_length
bar_length=15
# Progress bar colors
# When set to distro, uses your distro's logo colors.
#
# Default: 'distro', 'distro'
# Values: 'distro', 'num'
# Flag: --bar_colors
#
# Example:
# neofetch --bar_colors 3 4
# neofetch --bar_colors distro 5
bar_color_elapsed="distro"
bar_color_total="distro"
# Info display
# Display a bar with the info.
#
# Default: 'off'
# Values: 'bar', 'infobar', 'barinfo', 'off'
# Flags: --cpu_display
# --memory_display
# --battery_display
# --disk_display
#
# Example:
# bar: '[---=======]'
# infobar: 'info [---=======]'
# barinfo: '[---=======] info'
# off: 'info'
cpu_display="off"
memory_display="off"
battery_display="off"
disk_display="off"
# Backend Settings
# Image backend.
#
# Default: 'ascii'
# Values: 'ascii', 'caca', 'chafa', 'jp2a', 'iterm2', 'off',
# 'pot', 'termpix', 'pixterm', 'tycat', 'w3m', 'kitty'
# Flag: --backend
image_backend="ascii"
# Image Source
#
# Which image or ascii file to display.
#
# Default: 'auto'
# Values: 'auto', 'ascii', 'wallpaper', '/path/to/img', '/path/to/ascii', '/path/to/dir/'
# 'command output (neofetch --ascii "$(fortune | cowsay -W 30)")'
# Flag: --source
#
# NOTE: 'auto' will pick the best image source for whatever image backend is used.
# In ascii mode, distro ascii art will be used and in an image mode, your
# wallpaper will be used.
image_source="auto"
# Ascii Options
# Ascii distro
# Which distro's ascii art to display.
#
# Default: 'auto'
# Values: 'auto', 'distro_name'
# Flag: --ascii_distro
# NOTE: AIX, Alpine, Anarchy, Android, Antergos, antiX, "AOSC OS",
# "AOSC OS/Retro", Apricity, ArcoLinux, ArchBox, ARCHlabs,
# ArchStrike, XFerience, ArchMerge, Arch, Artix, Arya, Bedrock,
# Bitrig, BlackArch, BLAG, BlankOn, BlueLight, bonsai, BSD,
# BunsenLabs, Calculate, Carbs, CentOS, Chakra, ChaletOS,
# Chapeau, Chrom*, Cleanjaro, ClearOS, Clear_Linux, Clover,
# Condres, Container_Linux, CRUX, Cucumber, Debian, Deepin,
# DesaOS, Devuan, DracOS, DarkOs, DragonFly, Drauger, Elementary,
# EndeavourOS, Endless, EuroLinux, Exherbo, Fedora, Feren, FreeBSD,
# FreeMiNT, Frugalware, Funtoo, GalliumOS, Garuda, Gentoo, Pentoo,
# gNewSense, GNOME, GNU, GoboLinux, Grombyang, Guix, Haiku, Huayra,
# Hyperbola, janus, Kali, KaOS, KDE_neon, Kibojoe, Kogaion,
# Korora, KSLinux, Kubuntu, LEDE, LFS, Linux_Lite,
# LMDE, Lubuntu, Lunar, macos, Mageia, MagpieOS, Mandriva,
# Manjaro, Maui, Mer, Minix, LinuxMint, MX_Linux, Namib,
# Neptune, NetBSD, Netrunner, Nitrux, NixOS, Nurunner,
# NuTyX, OBRevenge, OpenBSD, openEuler, OpenIndiana, openmamba,
# OpenMandriva, OpenStage, OpenWrt, osmc, Oracle, OS Elbrus, PacBSD,
# Parabola, Pardus, Parrot, Parsix, TrueOS, PCLinuxOS, Peppermint,
# popos, Porteus, PostMarketOS, Proxmox, Puppy, PureOS, Qubes, Radix,
# Raspbian, Reborn_OS, Redstar, Redcore, Redhat, Refracted_Devuan,
# Regata, Rosa, sabotage, Sabayon, Sailfish, SalentOS, Scientific,
# Septor, SereneLinux, SharkLinux, Siduction, Slackware, SliTaz,
# SmartOS, Solus, Source_Mage, Sparky, Star, SteamOS, SunOS,
# openSUSE_Leap, openSUSE_Tumbleweed, openSUSE, SwagArch, Tails,
# Trisquel, Ubuntu-Budgie, Ubuntu-GNOME, Ubuntu-MATE, Ubuntu-Studio,
# Ubuntu, Venom, Void, Obarun, windows10, Windows7, Xubuntu, Zorin,
# and IRIX have ascii logos
# NOTE: Arch, Ubuntu, Redhat, and Dragonfly have 'old' logo variants.
# Use '{distro name}_old' to use the old logos.
# NOTE: Ubuntu has flavor variants.
# Change this to Lubuntu, Kubuntu, Xubuntu, Ubuntu-GNOME,
# Ubuntu-Studio, Ubuntu-Mate or Ubuntu-Budgie to use the flavors.
# NOTE: Arcolinux, Dragonfly, Fedora, Alpine, Arch, Ubuntu,
# CRUX, Debian, Gentoo, FreeBSD, Mac, NixOS, OpenBSD, android,
# Antrix, CentOS, Cleanjaro, ElementaryOS, GUIX, Hyperbola,
# Manjaro, MXLinux, NetBSD, Parabola, POP_OS, PureOS,
# Slackware, SunOS, LinuxLite, OpenSUSE, Raspbian,
# postmarketOS, and Void have a smaller logo variant.
# Use '{distro name}_small' to use the small variants.
ascii_distro="auto"
# Ascii Colors
#
# Default: 'distro'
# Values: 'distro', 'num' 'num' 'num' 'num' 'num' 'num'
# Flag: --ascii_colors
#
# Example:
# ascii_colors=(distro) - Ascii is colored based on Distro colors.
# ascii_colors=(4 6 1 8 8 6) - Ascii is colored using these colors.
ascii_colors=(distro)
# Bold ascii logo
# Whether or not to bold the ascii logo.
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --ascii_bold
ascii_bold="on"
# Image Options
# Image loop
# Setting this to on will make neofetch redraw the image constantly until
# Ctrl+C is pressed. This fixes display issues in some terminal emulators.
#
# Default: 'off'
# Values: 'on', 'off'
# Flag: --loop
image_loop="off"
# Thumbnail directory
#
# Default: '~/.cache/thumbnails/neofetch'
# Values: 'dir'
thumbnail_dir="${XDG_CACHE_HOME:-${HOME}/.cache}/thumbnails/neofetch"
# Crop mode
#
# Default: 'normal'
# Values: 'normal', 'fit', 'fill'
# Flag: --crop_mode
#
# See this wiki page to learn about the fit and fill options.
# https://github.com/dylanaraps/neofetch/wiki/What-is-Waifu-Crop%3F
crop_mode="normal"
# Crop offset
# Note: Only affects 'normal' crop mode.
#
# Default: 'center'
# Values: 'northwest', 'north', 'northeast', 'west', 'center'
# 'east', 'southwest', 'south', 'southeast'
# Flag: --crop_offset
crop_offset="center"
# Image size
# The image is half the terminal width by default.
#
# Default: 'auto'
# Values: 'auto', '00px', '00%', 'none'
# Flags: --image_size
# --size
image_size="auto"
# Gap between image and text
#
# Default: '3'
# Values: 'num', '-num'
# Flag: --gap
gap=3
# Image offsets
# Only works with the w3m backend.
#
# Default: '0'
# Values: 'px'
# Flags: --xoffset
# --yoffset
yoffset=0
xoffset=0
# Image background color
# Only works with the w3m backend.
#
# Default: ''
# Values: 'color', 'blue'
# Flag: --bg_color
background_color=
# Misc Options
# Stdout mode
# Turn off all colors and disables image backend (ASCII/Image).
# Useful for piping into another command.
# Default: 'off'
# Values: 'on', 'off'
stdout="off"

View File

@@ -2,8 +2,9 @@ blade-formatter
corepack
editorconfig-checker
github-release-notes
js-debug
neovim
prettier
standardjs
stylelint-lsp
tldr

View File

@@ -2,44 +2,99 @@
#
# Contains configuration from the follwing sources:
# - https://tmuxguide.readthedocs.io/en/latest/tmux/tmux.html
# -
# - https://github.com/dreamsofcode-io/tmux/blob/main/tmux.conf
# unbind default prefix and set it to ctrl-a
unbind C-b
set -g prefix C-a
bind C-a send-prefix
set-option -sa terminal-overrides ",xterm*:Tc"
# make delay shorter
# Mouse support
set -g mouse on
# Make delay shorter
set -sg escape-time 0
# Set <prefix> to Control + Space
unbind C-b
set -g prefix C-Space
bind C-Space send-prefix
#### key bindings ####
# reload config file
bind r source-file ~/.dotfiles/config/tmux/tmux.conf \; display "tmux.conf reloaded!"
# quickly open a new window
bind N new-window
# synchronize all panes in a window
bind y setw synchronize-panes
# pane movement shortcuts (same as vim)
# Vim style pane selection
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# enable mouse support for switching panes/windows
#set -g mouse-utf8 on
#set -g mouse on
# Start windows and panes at 1, not 0
set -g base-index 1
set -g pane-base-index 1
set-window-option -g pane-base-index 1
set-option -g renumber-windows on
# Use Alt-arrow keys without prefix key to switch panes
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# Shift arrow to switch windows
bind -n S-Left previous-window
bind -n S-Right next-window
# Shift Alt vim keys to switch windows
bind -n M-H previous-window
bind -n M-L next-window
# Reload tmux config with <prefix> + r
bind r source-file ~/.dotfiles/config/tmux/tmux.conf \; display "tmux cfg reloaded!"
# Open a new window with <prefix> + N
bind N new-window
# Plugins related configurations
## https://github.com/jaclu/tmux-menus
set -g @menus_trigger 'm'
## https://github.com/catppuccin/tmux
set -g @catppuccin_flavour 'mocha' # latte/frappe/macchiato/mocha
set -g @catppuccin_window_tabs_enabled on # or off to disable window_tabs
## https://github.com/tmux-plugins/tmux-continuum
set -g @continuum-restore 'on'
set -g @continuum-boot 'on'
set -g @continuum-boot-options 'iterm'
## https://github.com/tmux-plugins/tmux-resurrect
set -g @resurrect-strategy-nvim 'session'
## https://github.com/sainnhe/tmux-fzf
TMUX_FZF_LAUNCH_KEY="l"
## Install plugins, starting with plugin manager
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'jaclu/tmux-menus'
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'catppuccin/tmux'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'tmux-plugins/tmux-sessionist'
set -g @plugin 'sainnhe/tmux-fzf'
# set vi-mode
set-window-option -g mode-keys vi
# keybindings
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle
bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel
bind '"' split-window -v -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
# synchronize all panes in a window
bind y setw synchronize-panes
#### copy mode : vim ####
# set vi mode for copy mode
setw -g mode-keys vi
# copy mode using 'Esc'
unbind [
bind Escape copy-mode
@@ -51,3 +106,6 @@ bind Escape copy-mode
unbind p
bind p paste-buffer
# Finally run the tmux plugin manager
run '~/.config/tmux/plugins/tpm/tpm'

32
config/yamllint/config Normal file
View 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

View File

@@ -17,7 +17,6 @@ git submodule update --init --recursive
"${DOTBOT_BIN_PATH}" \
-d "${BASEDIR}" \
--plugin-dir=dotbot-brew \
--plugin-dir=dotbot-gh-extension \
--plugin-dir=dotbot-include \
-c "${CONFIG}" \
"${@}"
@@ -30,8 +29,8 @@ if [ "${DOTBOT_HOST}" != "" ]; then
&& "$DOTBOT_BIN_PATH" \
-d "$BASEDIR" \
--plugin-dir=dotbot-brew \
--plugin-dir=dotbot-gh-extension \
--plugin-dir=dotbot-include \
-c "$DOTBOT_HOST_CONFIG" \
"${@}"
fi

View File

@@ -1,33 +0,0 @@
#!/usr/bin/env bash
set -e
CONFIG="install.conf.yaml"
DOTBOT_DIR="dotbot"
DOTBOT_BIN="bin/dotbot"
BASEDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
DOTBOT_HOST="$(hostname -s)" || ''
DOTBOT_BIN_PATH="${BASEDIR}/${DOTBOT_DIR}/${DOTBOT_BIN}"
cd "$BASEDIR"
git submodule sync --quiet --recursive
git submodule update --init --recursive
"${DOTBOT_BIN_PATH}" \
-d "${BASEDIR}" \
--plugin-dir=dotbot-include \
-c "${CONFIG}" \
"${@}"
if [ "${DOTBOT_HOST}" != "" ]; then
DOTBOT_HOST_CONFIG="${BASEDIR}/hosts/${DOTBOT_HOST}/${CONFIG}"
echo "-> Trying if host config can be found: ${DOTBOT_HOST_CONFIG}"
[ -r "$DOTBOT_HOST_CONFIG" ] && [ -f "$DOTBOT_HOST_CONFIG" ] \
&& echo "(!) Found $DOTBOT_HOST_CONFIG" \
&& "$DOTBOT_BIN_PATH" \
-d "$BASEDIR" \
--plugin-dir=dotbot-include \
-c "$DOTBOT_HOST_CONFIG" \
"${@}"
fi

View File

@@ -1,4 +1,4 @@
- include: 'hosts/defaults.yaml'
- include: "hosts/defaults.yaml"
- clean:
~/:
~/.config:
@@ -9,7 +9,11 @@
~/.cache:
~/.cache/git:
~/.config:
~/.config/cheat/cheatsheets/personal:
~/.config/cheat/cheatsheets/pure-bash-bible:
~/.config/cheat/cheatsheets/tldr:
~/.local:
~/.local/run:
~/.local/share:
~/.local/state:
~/.ssh:
@@ -35,24 +39,3 @@
- shell:
- git submodule update --init --recursive --force
- bash local/bin/dfm install all
# GitHub CLI Extensions
- ghe:
# GitHub CLI extension for generating a report on repository dependencies.
- andyfeller/gh-dependency-report
# GitHub CLI extension to generate montage from GitHub user avatars
- andyfeller/gh-montage
# An opinionated GitHub Cli extension for creating
# changelogs that adhere to the keep a changelog specification.
- chelnak/gh-changelog
# Safely deletes local branches with no upstream and no un-pushed commits
- davidraviv/gh-clean-branches
# A beautiful CLI dashboard for GitHub 🚀
- dlvhdr/gh-dash
# A github-cli extension script to clone all repositories
# in an organization, optionally filtering by topic.
- matt-bartel/gh-clone-org
# being an extension to view the overall health of
# an organization's use of actions
- rsese/gh-actions-status
#

View File

@@ -9,18 +9,38 @@
# Helper variables, override with ENVs like `VERBOSE=1 dfm help`
: "${VERBOSE:=0}"
: "${DOTFILES:=$HOME/.dotfiles}"
: "${SHARED_SCRIPT:=$DOTFILES/scripts/shared.sh}"
: "${INSTALL_SCRIPT:=$DOTFILES/scripts/install-dotfiles.sh}"
: "${BREWFILE:=$DOTFILES/Brewfile}"
: "${HOSTFILES:=$DOTFILES/hosts}"
SCRIPT=$(basename "$0")
VERSION_NVM="v0.39.3"
# shellcheck source=./../../scripts/shared.sh
source "$DOTFILES/scripts/shared.sh"
source "$SHARED_SCRIPT"
function section_install
{
USAGE_PREFIX="$SCRIPT install"
USAGE_PREFIX="$SCRIPT install <command>"
MENU=(
"all:Installs everything in the correct order"
"antigen:Updates the antigen.zsh file"
"composer:Install composer"
"dotenv:Install dotenv-linter"
"gh:Install GitHub CLI Extensions"
"go:Install Go Packages"
"imagick:Install ImageMagick CLI"
"starship:Install starship.rs"
"macos:Setup nice macOS defaults"
"neofetch:Install neofetch"
"nvm:Install Node Version Manager (nvm)"
"npm:Install NPM Packages"
"ntfy:Install ntfy"
"z:Install z"
)
case "$1" in
all)
@@ -29,102 +49,145 @@ function section_install
$0 install starship
$0 brew install
$0 install composer
$0 install dotenv
$0 install fzf
$0 install gh
$0 install go
$0 install imagick
$0 install neofetch
$0 install nvm
$0 install npm
$0 install ntfy
$0 install z
;;
antigen)
curl -L git.io/antigen > "$DOTFILES/local/bin/antigen.zsh" \
&& msg_done "🎉 New antigen installed!"
curl -sSfL git.io/antigen -o "$DOTFILES/local/bin/antigen.zsh" \
&& msg_yay "New antigen installed!"
;;
composer)
bash "$DOTFILES/scripts/install-composer.sh" \
&& msg_done "🎉 composer installed!"
&& msg_yay "composer installed!"
;;
dotenv)
curl -sSfL \
https://raw.githubusercontent.com/dotenv-linter/dotenv-linter/master/install.sh \
| sh -s -- -b "$XDG_BIN_HOME" \
&& msg_yay "dotenv-linter installed!"
;;
fzf)
bash "$DOTFILES/scripts/install-fzf.sh" \
&& msg_yay "fzf installed!"
;;
gh)
bash "$DOTFILES/scripts/install-gh-extensions.sh" \
&& msg_yay "github cli extensions installed!"
;;
go)
bash "$DOTFILES/scripts/install-go-packages.sh" \
&& msg_yay "go packages installed!"
;;
imagick)
curl -L https://imagemagick.org/archive/binaries/magick > "$XDG_BIN_HOME/magick" \
&& chmod +x "$XDG_BIN_HOME/magick" \
&& msg_yay "imagick installed!"
;;
starship)
curl -sS https://starship.rs/install.sh | sh -s -- --bin-dir ~/.local/bin \
&& msg_done "🎉 starship installed!"
curl -sS https://starship.rs/install.sh | sh -s -- \
--bin-dir ~/.local/bin \
--yes \
&& msg_yay "starship installed!"
;;
macos)
bash "$DOTFILES/scripts/set-macos-defaults.sh" \
&& msg_done "🎉 Brewfile defined apps has been installed!"
&& msg_yay "Brewfile defined apps has been installed!"
;;
neofetch)
bash "$DOTFILES/scripts/install-neofetch.sh" \
&& msg_yay "neofetch installed!"
;;
nvm)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash \
&& git checkout "$HOME/.zshrc" \
&& nvm install --lts --latest-npm --default \
&& msg_done "🎉 nvm installed!"
curl -o- "https://raw.githubusercontent.com/nvm-sh/nvm/$VERSION_NVM/install.sh" | bash \
&& nvm install --lts --latest-npm --default
git checkout "$DOTFILES/base/zshrc"
msg_yay "nvm installed!"
;;
npm)
bash "$DOTFILES/scripts/install-npm-packages.sh" \
&& msg_done "🎉 NPM Packages have been installed!"
&& msg_yay "NPM Packages have been installed!"
;;
ntfy)
bash "$DOTFILES/scripts/install-ntfy.sh" \
&& msg_done "🎉 ntfy installed!"
&& msg_yay "ntfy installed!"
;;
z)
bash "$DOTFILES/scripts/install-z.sh" \
&& msg_done "🎉 Z has been installed!"
&& msg_yay "z has been installed!"
;;
*)
menu_section "$USAGE_PREFIX" "all | antigen | composer | starship | macos | nvm | npm"
menu_item "all" "Installs macos defaults, antigen, starship, brew, nvm and npm packages"
menu_item "antigen" "Updates the antigen.zsh file"
menu_item "composer" "Install composer"
menu_item "starship" "Install starship.rs"
menu_item "macos" "Setup nice macOS defaults"
menu_item "nvm" "Install Node Version Manager (nvm)"
menu_item "npm" "Install NPM Packages"
menu_item "ntfy" "Install ntfy"
menu_item "z" "Install z"
menu_usage "$USAGE_PREFIX" "${MENU[@]}"
;;
esac
}
function section_brew
{
USAGE_PREFIX="$SCRIPT brew"
USAGE_PREFIX="$SCRIPT brew <command>"
if ! command -v brew &> /dev/null; then
menu_section "$USAGE_PREFIX" "brew not available on this system"
else
MENU=(
"install:Installs items defined in Brewfile"
"update:Updates and upgrades brew packages"
"updatebundle:Updates Brewfile with descriptions"
"autoupdate:Setups brew auto-update and runs it immediately"
)
have brew && {
case "$1" in
install)
brew bundle install --file="$BREWFILE" && msg_done "🎉 Done!"
brew bundle install --file="$BREWFILE" && msg_yay "Done!"
;;
update)
brew update && brew outdated && brew upgrade && brew cleanup
msg_done "🎉 Done!"
msg_yay "Done!"
;;
updatebundle)
# Updates .dotfiles/Brewfile with descriptions
brew bundle dump \
--force \
--file="$BREWFILE" \
--describe && msg_done "🎉 Done!"
--describe && msg_yay "Done!"
;;
autoupdate)
brew autoupdate delete
brew autoupdate start 43200 --upgrade --cleanup --immediate
;;
*)
menu_section "$USAGE_PREFIX" "install | update | updatebundle | autoupdate"
menu_item "install" "Installs items defined in Brewfile"
menu_item "update" "Updates and upgrades brew packages"
menu_item "updatebundle" "Updates Brewfile with descriptions"
menu_item "autoupdate" "Setups brew auto-update and runs it immediately"
menu_usage "$USAGE_PREFIX" "${MENU[@]}"
;;
esac
fi
}
! have brew && menu_section "$USAGE_PREFIX" "brew not available on this system"
}
function section_dotfiles
{
USAGE_PREFIX="$SCRIPT dotfiles"
USAGE_PREFIX="$SCRIPT dotfiles <command>"
MENU=(
"fmt:Run all formatters"
"yamlfmt:Run yamlfmt to all dotfiles, which are in our control"
"shfmt:Run shfmt to all dotfiles"
"reset_all:Reset everything, runs all configured reset actions"
"reset_nvim:Resets nvim. Deletes caches, removes nvim folders and relinks nvim folders"
)
case "$1" in
fmt)
msg_ok "Running all formatters"
$0 dotfiles yamlfmt
$0 dotfiles shfmt
msg_done "...done!"
;;
reset_all)
msg_ok "Running all reset commands"
$0 dotfiles reset_nvim
@@ -137,16 +200,17 @@ function section_dotfiles
~/.config/astronvim \
~/.config/nvim
msg_ok "Deleted old nvim files"
ln -s ~/.dotfiles/config/astronvim ~/.config/astronvim
ln -s ~/.dotfiles/config/nvim ~/.config/nvim
ln -s "$DOTFILES/config/astronvim" ~/.config/astronvim
ln -s "$DOTFILES/config/nvim" ~/.config/nvim
msg_ok "Linked nvim and astronvim"
hash npm 2> /dev/null && $0 install npm
have npm && $0 install npm
msg_ok "Installed packages"
msg_done "nvim reset!"
;;
yamlfmt)
# format yaml files
yamlfmt -conf "$DOTFILES/.yamlfmt"
have yamlfmt && yamlfmt -conf "$DOTFILES/.yamlfmt"
! have yamlfmt && msg_err "yamlfmt not found"
;;
shfmt)
# Format shell scripts according to following rules.
@@ -154,6 +218,7 @@ function section_dotfiles
-type f -perm +111 \
-not -path '*/.git/*' \
-not -path '*dotbot*' \
-not -path '*tmux*' \
-not -name '*.pl' \
-not -name '*.py' \
-not -name '*.php' \
@@ -163,24 +228,25 @@ function section_dotfiles
--func-next-line --list --write \
--indent 2 --case-indent --space-redirects \
--binary-next-line {} \;
msg_done "🎉 dotfiles have been shfmt formatted!"
msg_yay "dotfiles have been shfmt formatted!"
;;
*)
menu_section "$USAGE_PREFIX" "reset_all | reset_nvim | yamlfmt | shfmt"
menu_item "reset_all" "Reset everything, runs all configured reset actions"
menu_item "reset_nvim" "Resets nvim. Deletes caches, removes nvim folders and relinks nvim folders"
menu_item "yamlfmt" "Run yamlfmt to all dotfiles, which are in our control"
menu_item "shfmt" "Run shfmt to all dotfiles"
menu_usage "$USAGE_PREFIX" "${MENU[@]}"
;;
esac
}
function section_check
{
USAGE_PREFIX="$SCRIPT check"
USAGE_PREFIX="$SCRIPT check <command>"
X_HOSTNAME=$(hostname)
X_ARCH=$(uname)
MENU=(
"arch <arch>:Empty <arch> returns current. Exit code 0=match to current, 1=no match."
"host <host>:Empty <host> returns current. Exit code 0=match to current, 1=no match."
)
case "$1" in
a | arch)
[[ "$2" = "" ]] && echo "$X_ARCH" && exit 0
@@ -191,9 +257,7 @@ function section_check
[[ $X_HOSTNAME = "$2" ]] && exit 0 || exit 1
;;
*)
menu_section "$USAGE_PREFIX" "arch | host"
menu_item "arch <arch>" "Empty returns current. Exit code 0 when match, 1 when not."
menu_item "host <host>" "Empty returns current. Exit code 0 when match, 1 when not."
menu_usage "$USAGE_PREFIX" "${MENU[@]}"
;;
esac
}
@@ -201,24 +265,31 @@ function section_check
# Secret menu for visual tests
function section_tests
{
USAGE_PREFIX="$SCRIPT tests"
USAGE_PREFIX="$SCRIPT tests <command>"
MENU=(
"msg:List all log functions from shared.sh"
)
case "$1" in
msg)
msg "msg"
msg_done "msg_done"
msg_prompt "msg_prompt"
msg_prompt_done "msg_prompt_done"
msg_done_suffix "msg_done_suffix"
msg_err "msg_err"
msg_nested "msg_nested"
msg_nested_done "msg_nested_done"
msg_run "msg_run" "second_param"
msg_ok "msg_ok"
msg_prompt "msg_prompt"
msg_prompt_done "msg_prompt_done"
msg_run "msg_run" "second_param"
msg_run_done "msg_run_done" "second_param"
msg_warn "msg_warn"
msg_err "msg_err"
msg_yay "msg_yay"
msg_yay_done "msg_yay_done"
;;
*)
menu_section "$USAGE_PREFIX" "msg"
menu_item "msg" "List all log functions from shared.sh"
menu_usage "$USAGE_PREFIX" "${MENU[@]}"
;;
esac
}
@@ -226,8 +297,8 @@ function section_tests
function usage
{
echo ""
menu_section "Usage: $SCRIPT" "install | reset | brew | check | dotfiles"
echo $" All commands have their own subcommands."
msg_prompt "Usage: $SCRIPT <section> <command>"
echo $" Empty <command> prints <section> help."
echo ""
section_install
echo ""

57
local/bin/x-compare-versions.py Executable file
View File

@@ -0,0 +1,57 @@
#!/usr/bin/env python
"""
Version Comparison tool for the CLI.
Adapted from script found in anishathalye's dotfiles.
https://github.com/anishathalye/dotfiles/blob/master/bin/vercmp
"""
import operator
import sys
from packaging import version
str_to_operator = {
"==": operator.eq,
"!=": operator.ne,
"<": operator.lt,
"<=": operator.le,
">": operator.gt,
">=": operator.ge,
}
def vercmp(expr):
"""Version Comparison function."""
words = expr.split()
comparisons = [words[i: i + 3] for i in range(0, len(words) - 2, 2)]
for left, op_str, right in comparisons:
compare_op = str_to_operator[op_str]
if not compare_op(version.parse(left), version.parse(right)):
return False
return True
def main():
"""Triggers version comparison if line is provided."""
for line in sys.stdin:
if not vercmp(line):
sys.exit(1)
sys.exit(0)
def test():
"""Basic functionality tests."""
assert not vercmp("1.9 >= 2.4")
assert vercmp("2.4 >= 2.4")
assert vercmp("2.5 >= 2.4")
assert vercmp("3 >= 2.999")
assert vercmp("2.9 < 2.9a")
assert vercmp("2.9a >= 2.8")
if __name__ == "__main__":
if len(sys.argv) == 2 and sys.argv[1] == "test":
test()
else:
main()

13
local/bin/x-dc Executable file
View File

@@ -0,0 +1,13 @@
#!/usr/bin/env bash
# Verify folder exists, and if it does not, create it.
dir="$1"
[ $# -eq 0 ] && {
echo "Usage: $0 full/path/to/dir/to/create"
exit 1
}
if [ ! -d "$dir" ]; then
mkdir -p "$dir" && exit 0
fi

53
local/bin/x-hr Executable file
View File

@@ -0,0 +1,53 @@
#!/usr/bin/env bash
# Simple script to output a solid line in the terminal
# Useful for marking the end of a task in your bash log
# Inspired by @LuRsT's script of the same name
# Can be called directly, or source'd in *rc file
#
# Licensed under MIT, (C) Alicia Sykes 2022
# See: https://github.com/Lissy93/dotfiles
#
# Modified by Ismo Vuorinen <https://github.com/ivuorinen> 2023
# Determine width of terminal
hr_col_count="$(tput cols)"
if [ -z "${hr_col_count+set}" ] || [ "$hr_col_count" -lt 1 ]; then
hr_col_count="${COLUMNS:-80}"
fi
# Colors
CLR_RED="\033[1;31m"
hr_color="${hr_color:=$CLR_RED}"
hr_reset="\033[0m"
# Prints the HR line
hr_draw_char() {
local CHAR="$1"
local LINE=''
LINE=$(printf "%*s" "$((hr_col_count - 2))")
LINE="${LINE// /${CHAR}}"
echo -e "◀${hr_color}${LINE:0:${hr_col_count}}${hr_reset}▶"
}
# Passes param and calls hr()
hr() {
for WORD in "${@:--}"; do
hr_draw_char "$WORD"
done
}
# Determine if file is being run directly or sourced
(
[[ -n $ZSH_EVAL_CONTEXT && $ZSH_EVAL_CONTEXT =~ :file$ ]] \
|| [[ -n $KSH_VERSION && $(cd "$(dirname -- "$0")" \
&& printf '%s' "${PWD%/}/")$(basename -- "$0") != "${.sh.file}" ]] \
|| [[ -n $BASH_VERSION ]] && (return 0 2>/dev/null)
) && sourced=1 || sourced=0
# Either instantiate immediately, or set alias for later
if [ "$sourced" -eq 0 ]; then
[ "$0" == "${BASH_SOURCE[0]}" ] && hr "$@"
else
export alias hr='hr'
fi

4
local/bin/x-ip Executable file
View File

@@ -0,0 +1,4 @@
#!/usr/bin/env bash
# Source: https://github.com/thirtythreeforty/dotfiles/blob/master/bin/extip
curl icanhazip.com "${@}"

39
local/bin/x-thumbgen Executable file
View File

@@ -0,0 +1,39 @@
#!/usr/bin/env bash
# Generate thumbnails using magick
# https://imagemagick.org/script/download.php
#
# Defaults to current directory creating thumbs with 1000x1000
# images with 200px white borders around the original image.
#
# Defaults can be overridden with ENV variables like this:
# $ THMB_BACKGROUND=black x-thumbgen ~/images/
#
# Created by: Ismo Vuorinen <https://github.com/ivuorinen> 2015
: "${THMB_SOURCE:=$1}"
: "${THMB_BACKGROUND:=white}"
: "${THMB_RESIZE:=800x800}"
: "${THMB_EXTENT:=1000x1000}"
[ $# -eq 0 ] && {
echo "Usage: $0 /full/path/to/image/folder"
exit 1
}
if [ "$THMB_SOURCE" == "" ] || [ ! -d "$THMB_SOURCE" ]; then
THMB_SOURCE=$(pwd)
fi
if command -v magick &> /dev/null; then
magick \
"$THMB_SOURCE/*" \
-resize "$THMB_RESIZE" \
-background "$THMB_BACKGROUND" \
-gravity center \
-extent "$THMB_EXTENT" \
-set filename:fname '%t_thumb.%e' +adjoin '%[filename:fname]'
else
echo "magick not found in PATH, https://imagemagick.org/script/download.php"
fi

93
local/bin/x-welcome-banner Executable file
View File

@@ -0,0 +1,93 @@
#!/usr/bin/env bash
######################################################################
# 🌞 Welcome Banner #
######################################################################
# Prints personal greeting, system info and data about today #
# Intended for use as a MOTD, for when using multiple systems #
# For docs and more info, see: https://github.com/lissy93/dotfiles #
# #
# Licensed under MIT (C) Alicia Sykes 2022 <https://aliciasykes.com> #
######################################################################
# Formatting variables
COLOR_P='\033[1;36m'
COLOR_S='\033[0;36m'
RESET='\033[0m'
# Print time-based personalized message, using figlet & lolcat if availible
function welcome_greeting () {
h=$(date +%H)
if [ "$h" -lt 04 ] || [[ $h -gt 22 ]];
then greeting="Good Night"
elif [ "$h" -lt 12 ];
then greeting="Good morning"
elif [ "$h" -lt 18 ];
then greeting="Good afternoon"
elif [ "$h" -lt 22 ];
then greeting="Good evening"
else
greeting="Hello"
fi
WELCOME_MSG="$greeting $USER!"
if hash lolcat 2>/dev/null && hash figlet 2>/dev/null; then
echo "${WELCOME_MSG}" | figlet | lolcat
else
echo -e "$COLOR_P${WELCOME_MSG}${RESET}\n"
fi
}
# Print system information with neofetch, if it's installed
function welcome_sysinfo () {
if hash neofetch 2>/dev/null; then
neofetch --shell_version off \
--disable kernel distro shell resolution de wm wm_theme theme icons terminal \
--backend off \
--colors 4 8 4 4 8 6 \
--color_blocks off \
--memory_display info
fi
}
# Print todays info: Date, IP, weather, etc
function welcome_today () {
timeout=1
echo -e "\033[1;34mToday\n------"
# Print date time
echo -e "$COLOR_S$(date '+🗓️ Date: %A, %B %d, %Y at %H:%M')"
# Print local weather
curl -s -m $timeout "https://wttr.in?format=%cWeather:+%C+%t,+%p+%w"
echo -e "${RESET}"
# Print IP address
if hash ip 2>/dev/null; then
ip_address=$(ip route get 8.8.8.8 | awk -F"src " 'NR==1{split($2,a," ");print a[1]}')
ip_interface=$(ip route get 8.8.8.8 | awk -F"dev " 'NR==1{split($2,a," ");print a[1]}')
echo -e "${COLOR_S}🌐 IP: $(curl -s -m $timeout 'https://ipinfo.io/ip') (${ip_address} on ${ip_interface})"
echo -e "${RESET}\n"
fi
}
# Putting it all together
function welcome() {
welcome_greeting
welcome_sysinfo
welcome_today
}
# Determine if file is being run directly or sourced
([[ -n $ZSH_EVAL_CONTEXT && $ZSH_EVAL_CONTEXT =~ :file$ ]] \
|| [[ -n $KSH_VERSION && $(cd "$(dirname -- "$0")" \
&& printf '%s' "${PWD%/}/")$(basename -- "$0") != "${.sh.file}" ]] \
|| [[ -n $BASH_VERSION ]] && (return 0 2>/dev/null)
) && sourced=1 || sourced=0
# If script being called directly run immediately
if [ "$sourced" -eq 0 ]; then
welcome "$@"
fi
# EOF

View File

@@ -0,0 +1,54 @@
#!/usr/bin/env bash
# shellcheck disable=SC2231,SC2034,SC2181,SC2068
# shellcheck source=shared.sh
source "$HOME/.dotfiles/scripts/shared.sh"
PBB_REQUIRED_TOOLS=(basename git mkdir cheat ls grep head awk cp echo rm)
for t in ${PBB_REQUIRED_TOOLS[@]}; do
! have "$t" && echo "(!) $t is missing, can't continue..." && exit 1
done
PBB_GIT="https://github.com/dylanaraps/pure-bash-bible.git"
PBB_SOURCE="source: $PBB_GIT"
PBB_SYNTAX="syntax: bash"
PBB_TAGS="tags: [bash]"
PBB_TEMP_PREFIX=$(basename "$0")
PBB_TEMP_DIR="/tmp/pbb-$(rnd)"
# If there's no .git, clone the folder
if [ ! -d "$PBB_TEMP_DIR/.git" ]; then
git clone "$PBB_GIT" "$PBB_TEMP_DIR"
fi
PBB_CHAPTERS=$(ls -1v "$PBB_TEMP_DIR"/manuscript/chapter*)
CHEAT_DEST="$(cheat -d | grep pure-bash-bible | head -1 | awk '{print $2}')"
if [ ! -d "$CHEAT_DEST" ]; then
mkdir -p "$CHEAT_DEST"
fi
for f in ${PBB_CHAPTERS[@]}; do
# get all headers, take the first one, strip the # and return the first word in lowercase
HEADER=$(grep -e '^[#] ' "$f" | head -1 | awk '{print tolower($2)}')
CHEAT_FILE="$CHEAT_DEST/${HEADER}"
echo "(*) $CHEAT_FILE"
if [ ! -f "$CHEAT_FILE" ]; then
cp "$f" "$CHEAT_FILE"
fi
LC_ALL=C perl -pi.bak -e 's/\<\!-- CHAPTER END --\>//' "$CHEAT_FILE"
rm "$CHEAT_FILE.bak"
# add tags if the file doesn't have them
if [ '---' != "$(head -1 < "$CHEAT_FILE")" ]; then
T="$PBB_SYNTAX\n$PBB_TAGS\n$PBB_SOURCE\n"
echo -e "---\n$T---\n$(cat "$CHEAT_FILE")" > "$CHEAT_FILE"
fi
done
# Cleanup
if [ -d "$PBB_TEMP_DIR" ]; then
rm -rf "$PBB_TEMP_DIR"
fi

66
scripts/install-cheat-tldr.sh Executable file
View File

@@ -0,0 +1,66 @@
#!/usr/bin/env bash
# shellcheck disable=SC2231,SC2034,SC2181,SC2068
# shellcheck source=shared.sh
source "$HOME/.dotfiles/scripts/shared.sh"
TLDR_REQUIRED_TOOLS=(basename git mkdir cheat ls grep head awk cp echo rm)
for t in ${TLDR_REQUIRED_TOOLS[@]}; do
! have "$t" && echo "(!) $t is missing, can't continue..." && exit 1
done
TLDR_GIT="https://github.com/tldr-pages/tldr.git"
TLDR_SOURCE="source: $TLDR_GIT"
TLDR_SYNTAX="syntax: markdown"
TLDR_TEMP_PREFIX=$(basename "$0")
TLDR_TEMP_DIR="/tmp/cheat-tldr-$(rnd)"
# If there's no .git, clone the folder
if [ ! -d "$TLDR_TEMP_DIR/.git" ]; then
git clone --depth 1 "$TLDR_GIT" "$TLDR_TEMP_DIR"
fi
# Fetch the destination directory from cheat defined directories.
TLDR_CHEAT_DEST="$(cheat -d | grep tldr | head -1 | awk '{print $2}')"
[ "$TLDR_CHEAT_DEST" = "" ] \
&& msg_err "cheat doesn't know about the destination" \
&& exit 1
if [ ! -d "$TLDR_CHEAT_DEST" ]; then
mkdir -p "$TLDR_CHEAT_DEST"
fi
for d in "$TLDR_TEMP_DIR"/pages/*; do
DIRNAME=$(basename "$d")
# echo "-> $DIRNAME ($d)"
SECTION_DIR="${TLDR_CHEAT_DEST}/$DIRNAME"
TLDR_TAGS="tags: [$DIRNAME]"
if [ ! -d "$SECTION_DIR" ]; then
mkdir -p "$SECTION_DIR"
fi
for FILE in $d/*.md; do
BASENAME=$(basename "$FILE" .md)
FILENAME="${BASENAME%%.*}"
# echo "-> $FILE = $FILENAME"
TLDR_FILE="$SECTION_DIR/${FILENAME}"
# echo "-> dest: $TLDR_FILE"
if [ ! -f "$TLDR_FILE" ]; then
cp "$FILE" "$TLDR_FILE"
fi
if [ -f "$TLDR_FILE" ] && [ '---' != "$(head -1 < "$TLDR_FILE")" ]; then
echo -e "---\n$TLDR_SYNTAX\n$TLDR_TAGS\n$TLDR_SOURCE\n---\n$(cat "$TLDR_FILE")" > "$TLDR_FILE"
fi
done
done
# Cleanup
if [ -d "$TLDR_TEMP_DIR" ]; then
rm -rf "$TLDR_TEMP_DIR"
fi

View File

@@ -1,6 +1,10 @@
#!/bin/bash
#!/usr/bin/env bash
# Install PHP Package Manager Composer
#
# shellcheck source="shared.sh"
source "$HOME/.dotfiles/scripts/shared.sh"
if command -v php &> /dev/null; then
have php && {
EXPECTED_CHECKSUM="$(php -r 'copy("https://composer.github.io/installer.sig", "php://stdout");')"
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
ACTUAL_CHECKSUM="$(php -r "echo hash_file('sha384', 'composer-setup.php');")"
@@ -16,4 +20,4 @@ if command -v php &> /dev/null; then
rm composer-setup.php
mv composer.phar ~/.local/bin/composer
exit $RESULT
fi
} || msg_err "PHP Not Available, cannot install composer"

17
scripts/install-fzf.sh Executable file
View File

@@ -0,0 +1,17 @@
#!/usr/bin/env bash
#
# Install fzf
#
# shellcheck source=shared.sh
source "$HOME/.dotfiles/scripts/shared.sh"
FZF_GIT="https://github.com/junegunn/fzf.git"
FZF_PATH="${XDG_CONFIG_HOME}/fzf"
if [ ! -d "$FZF_PATH" ]; then
git clone --depth 1 "$FZF_GIT" "$FZF_PATH"
"$FZF_PATH/install" --xdg --all --no-update-rc
else
msg_done "fzf ($FZF_PATH/) already installed"
fi

View File

@@ -0,0 +1,45 @@
#!/usr/bin/env bash
# Install GitHub CLI extensions
#
# shellcheck source="shared.sh"
source "$HOME/.dotfiles/scripts/shared.sh"
have gh && {
extensions=(
# GitHub CLI extension for generating a report on repository dependencies.
andyfeller/gh-dependency-report
# GitHub CLI extension to generate montage from GitHub user avatars
andyfeller/gh-montage
# An opinionated GitHub Cli extension for creating
# changelogs that adhere to the keep a changelog specification.
chelnak/gh-changelog
# Safely deletes local branches with no upstream and no un-pushed commits
davidraviv/gh-clean-branches
# A beautiful CLI dashboard for GitHub 🚀
dlvhdr/gh-dash
# A github-cli extension script to clone all repositories
# in an organization, optionally filtering by topic.
matt-bartel/gh-clone-org
# being an extension to view the overall health of
# an organization's use of actions
rsese/gh-actions-status
)
msg "Starting to install GitHub CLI extensions..."
for ext in "${extensions[@]}"; do
# Trim spaces
ext=${ext// /}
# Skip comments
if [[ ${ext:0:1} == "#" ]]; then continue; fi
msg_run "Installing $ext"
gh extensions install "$ext"
echo ""
done
msg_ok "Done"
}
! have gh \
&& msg_err "gh (GitHub Client) could not be found, please install it first"

View File

@@ -4,14 +4,24 @@
# shellcheck source=shared.sh
source "$HOME/.dotfiles/scripts/shared.sh"
if ! command -v go &> /dev/null; then
msg "go hasn't been installed yet."
else
have go && {
packages=(
# sysadmin/scripting utilities, distributed as a single binary
github.com/skx/sysbox@latest
# Git Profile allows you to switch between user profiles in git repos
github.com/dotzero/git-profile@latest
# An extensible command line tool or library to format yaml files.
github.com/google/yamlfmt/cmd/yamlfmt@latest
# Parsing HTML at the command line
github.com/ericchiang/pup@latest
# HTML to Markdown converter
github.com/suntong/html2md@latest
# cheat allows you to create and view interactive cheatsheets on the cli.
github.com/cheat/cheat/cmd/cheat@latest
# Render markdown on the CLI, with pizzazz! 💅
github.com/charmbracelet/glow@latest
# Static checker for GitHub Actions workflow files
github.com/rhysd/actionlint/cmd/actionlint@latest
)
for pkg in "${packages[@]}"; do
@@ -26,5 +36,6 @@ else
done
msg_ok "Done"
}
fi
! have go && msg "go hasn't been installed yet."

25
scripts/install-neofetch.sh Executable file
View File

@@ -0,0 +1,25 @@
#!/usr/bin/env bash
#
# Install neofetch from source
#
# shellcheck source=shared.sh
source "$HOME/.dotfiles/scripts/shared.sh"
NEOFETCH_VERSION="7.1.0"
NEOFETCH_REPO="https://github.com/dylanaraps/neofetch"
NEOFETCH_URL="${NEOFETCH_REPO}/archive/refs/tags/${NEOFETCH_VERSION}.tar.gz"
NEOFETCH_TEMP="/tmp/neofetch"
NEOFETCH_INSTALL_PREFIX="$HOME/.local"
have neofetch || {
LC_ALL=C
mkdir -p "$NEOFETCH_TEMP" "$NEOFETCH_INSTALL_PREFIX"
curl -L "$NEOFETCH_URL" > "$NEOFETCH_TEMP.tar.gz"
tar zxvf "$NEOFETCH_TEMP.tar.gz" --directory="$NEOFETCH_TEMP"
cd "$NEOFETCH_TEMP/neofetch-$NEOFETCH_VERSION" \
&& make PREFIX="${NEOFETCH_INSTALL_PREFIX}" install \
&& rm -rf "$NEOFETCH_TEMP*" \
&& msg_yay "neofetch installed!"
}

View File

@@ -4,9 +4,7 @@
# shellcheck source=shared.sh
source "$HOME/.dotfiles/scripts/shared.sh"
if ! command -v npm &> /dev/null; then
msg_err "npm could not be found."
else
have npm && {
packages=(
# This is a tool to check if your files consider your .editorconfig rules.
"editorconfig-checker"
@@ -15,12 +13,6 @@ else
"github-release-notes"
"neovim"
"prettier"
"@bchatard/alfred-jetbrains"
"@johnnymorganz/stylua-bin"
"js-debug"
"stylelint-lsp"
"blade-formatter"
"@loopback/cli"
"corepack"
"standardjs"
)
@@ -31,8 +23,19 @@ else
# Skip comments
if [[ ${pkg:0:1} == "#" ]]; then continue; fi
msg_run "Installing npm package:" "$pkg"
npm install -g --no-fund --no-progress --no-timing "$pkg"
if [[ $(npm ls -g -p "$pkg") != "" ]]; then
msg_run_done "$pkg" "already installed"
else
msg_run "Installing npm package:" "$pkg"
npm install -g --no-fund --no-progress --no-timing "$pkg"
fi
echo ""
done
fi
msg_run "Upgrading all global packages"
npm -g --no-progress --no-timing --no-fund outdated
npm -g --no-timing --no-fund upgrade
}
! have npm && msg_err "npm could not be found."

View File

@@ -1,8 +1,14 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Install ntfy
#
# shellcheck source=shared.sh
source "$HOME/.dotfiles/scripts/shared.sh"
set -e
if ! command -v ntfy &> /dev/null; then
have ntfy && msg "ntfy already installed"
! have ntfy && {
case $(dfm check arch) in
Linux)
NTFY_ARCH="linux_$(arch)"
@@ -28,6 +34,4 @@ if ! command -v ntfy &> /dev/null; then
fi
rm -rf "${NTFY_DEST}" "${NTFY_DEST}.tar.gz"
else
echo "ntfy already installed"
fi
}

View File

@@ -4,6 +4,12 @@
# Ismo Vuorinen <https://github.com/ivuorinen> 2018
#
[ "$(uname)" != "Darwin" ] && echo "Not a macOS system" && exit 0
! have xcode-select \
&& msg_err "xcode-select could not be found, skipping" \
&& exit 0
# Ask for the administrator password upfront
sudo -v
@@ -14,10 +20,12 @@ while true; do
kill -0 "$$" || exit
done 2> /dev/null &
# https://unix.stackexchange.com/a/408305
# check if user has git installed and propose to install if not installed
if [ "$(which git)" ]; then
echo "You already have git. Continuing..."
XCODE_TOOLS_PATH=$(xcode-select -p)
XCODE_SWIFT_PATH="$XCODE_TOOLS_PATH/usr/bin/swift"
# Modified from https://unix.stackexchange.com/a/408305
if [ -a "$XCODE_SWIFT_PATH" ]; then
echo "You have swift from xcode-select. Continuing..."
else
XCODE_MESSAGE="$(
osascript -e \
@@ -32,7 +40,7 @@ else
fi
fi
until [ "$(which git)" ]; do
until [ -f "$XCODE_SWIFT_PATH" ]; do
echo -n "."
sleep 1
done

View File

@@ -1,4 +1,9 @@
#!/usr/bin/env bash
#
# Install z
#
# shellcheck source=shared.sh
source "$HOME/.dotfiles/scripts/shared.sh"
Z_GIT_PATH="https://github.com/rupa/z.git"
Z_BIN_PATH="$XDG_BIN_HOME/z"
@@ -6,5 +11,5 @@ Z_BIN_PATH="$XDG_BIN_HOME/z"
if [ ! -d "$Z_BIN_PATH" ]; then
git clone "$Z_GIT_PATH" "$Z_BIN_PATH"
else
echo "z ($Z_BIN_PATH/) already installed"
msg_done "z ($Z_BIN_PATH/) already installed"
fi

View File

@@ -191,7 +191,8 @@ defaults write com.apple.finder FXInfoPanesExpanded -dict \
###############################################################################
# Set default screenshot location
#defaults write com.apple.screencapture "location" -string "~/Documents/Screenshots"
mkdir -p "$HOME/Documents/Screenshots"
defaults write com.apple.screencapture "location" -string "$HOME/Documents/Screenshots"
# Exclude date and time in screenshot filenames
defaults write com.apple.screencapture "include-date" -bool true
@@ -245,7 +246,10 @@ defaults write com.apple.Safari \
-bool true
# Dont display the annoying prompt when quitting iTerm
#defaults write com.googlecode.iterm2 PromptOnQuit -bool false
defaults write com.googlecode.iterm2 PromptOnQuit -bool false
# Use iTerm2 preferences from the .dotfiles folder.
defaults write com.googlecode.iterm2 PrefsCustomFolder \
-string "$HOME/.dotfiles/config/iterm2"
# Prevent Time Machine from prompting to use new hard drives as backup volume
defaults write com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool true

View File

@@ -11,6 +11,28 @@ CLR_GREEN="\033[1;32m"
CLR_BLUE="\033[1;34m"
CLR_RESET="\033[0m"
# -- Color functions -- #
function __color_red()
{
local MSG="$1"
echo -e "${CLR_RED}${MSG}${CLR_RESET}"
}
function __color_yellow()
{
local MSG="$1"
echo -e "${CLR_YELLOW}${MSG}${CLR_RESET}"
}
function __color_green()
{
local MSG="$1"
echo -e "${CLR_GREEN}${MSG}${CLR_RESET}"
}
function __color_blue()
{
local MSG="$1"
echo -e "${CLR_BLUE}${MSG}${CLR_RESET}"
}
# -- Helpers -- #
function __log_marker()
{
@@ -32,6 +54,11 @@ function __log_marker_warn()
echo -e "${CLR_YELLOW}${CLR_RESET}"
}
function __log_marker_question()
{
echo -e "${CLR_YELLOW}?${CLR_RESET}"
}
function __log_marker_err()
{
echo -e "${CLR_RED}${CLR_RESET}"
@@ -48,19 +75,34 @@ function msg()
echo -e "$(__log_marker) $1"
}
function msg_yay()
{
echo -e "🎉 $1"
}
function msg_yay_done()
{
echo -e "🎉 $1 ...$(__log_marker_ok)"
}
function msg_done()
{
echo -e "$(__log_marker) $1 ...$(__log_marker_ok)"
}
function msg_done_suffix()
{
echo -e "$(__log_marker) ...$(__log_marker_ok)"
}
function msg_prompt()
{
echo -e "$(__log_marker) $1"
echo -e "$(__log_marker_question) $1"
}
function msg_prompt_done()
{
echo -e "$(__log_marker) $1 ...$(__log_marker_ok)"
echo -e "$(__log_marker_question) $1 ...$(__log_marker_ok)"
}
function msg_nested()
@@ -78,6 +120,11 @@ function msg_run()
echo -e "${CLR_GREEN}$1${CLR_RESET} $2"
}
function msg_run_done()
{
echo -e "${CLR_GREEN}$1${CLR_RESET} $2 ...$(__log_marker_ok)"
}
function msg_ok()
{
echo -e "$(__log_marker_ok) $1"
@@ -111,3 +158,75 @@ function fn_exists()
declare -f -F "$1" > /dev/null
return $?
}
# Takes a bash array ("cow:moo", "dinosaur:roar") and loops
# through the keys to build menu section listing.
function menu_usage_header()
{
MENU_CMD="$1"
shift
MENU_ARRAY=("$@")
KEYS=""
for item in "${MENU_ARRAY[@]}"; do
CMD=$(echo "${item}" | awk -F ":" '{print $1}')
KEYS+="${CMD} | "
done
# "???" removes 3 last characters, being " | " from the end
menu_section "$MENU_CMD" "${KEYS%???}"
}
# Takes the usage command "$0 dotfiles" and a
# bash array ("cow:moo" "dinosaur:roar") and loops
# through in building a menu for dfm command usage listing.
function menu_usage()
{
MENU_CMD="$1"
shift
MENU_ARRAY=("$@")
msg "$MENU_CMD"
for item in "${MENU_ARRAY[@]}"; do
CMD=$(echo "${item}" | awk -F ":" '{print $1}')
DESC=$(echo "${item}" | awk -F ":" '{print $2}')
menu_item "$CMD" "$DESC"
done
}
# shorthand for checking if the system has the bin in path.
# usage: have php && php -v
function have
{
command -v "$1" >&/dev/null
}
# Remove directory from the PATH variable
# usage: path_remove ~/.local/bin
function path_remove
{
PATH=$(echo -n "$PATH" | awk -v RS=: -v ORS=: "\$0 != \"$1\"" | sed 's/:$//')
}
# Append directory to the PATH
# usage: path_append ~/.local/bin
function path_append
{
path_remove "$1"
PATH="${PATH:+"$PATH:"}$1"
}
# Prepend directory to the PATH
# usage: path_prepend ~/.local/bin
function path_prepend
{
path_remove "$1"
PATH="$1${PATH:+":$PATH"}"
}
# Creates a random string
rnd()
{
echo $RANDOM | md5sum | head -c 20
}