Compare commits

...

6 Commits

Author SHA1 Message Date
Ismo Vuorinen
34a0d7d8c4 brew: Brewfile update 2023-01-17 10:02:09 +02:00
Ismo Vuorinen
65bf470c5b dfm: brew autoupdate now removes first, then adds 2023-01-17 10:01:40 +02:00
Ismo Vuorinen
965c47efef zshrc: secret exports, alias and functions files 2023-01-17 10:00:49 +02:00
410f5ac2b5 nvim: wakatime/vim-wakatime 2023-01-16 22:58:22 +02:00
Ismo Vuorinen
b6a18688c4 Fix shfmt command and formatted files 2023-01-12 16:49:49 +02:00
9f1ba5034f nvim: Added harpoon 2023-01-09 04:04:09 +02:00
13 changed files with 154 additions and 123 deletions

View File

@@ -120,6 +120,8 @@ brew "mas"
brew "midnight-commander" brew "midnight-commander"
# Ambitious Vim-fork focused on extensibility and agility # Ambitious Vim-fork focused on extensibility and agility
brew "neovim" brew "neovim"
# No Nonsense Neovim Client in Rust
brew "neovide"
# Port scanning utility for large networks # Port scanning utility for large networks
brew "nmap" brew "nmap"
# Manage multiple Node.js versions # Manage multiple Node.js versions
@@ -128,6 +130,8 @@ brew "nvm"
brew "openjdk" brew "openjdk"
# Generate clients, server & docs from an OpenAPI spec (v2, v3) # Generate clients, server & docs from an OpenAPI spec (v2, v3)
brew "openapi-generator" brew "openapi-generator"
# Swiss-army knife of markup format conversion
brew "pandoc"
# Highly capable, feature-rich programming language # Highly capable, feature-rich programming language
brew "perl" brew "perl"
# Interpreted, interactive, object-oriented programming language # Interpreted, interactive, object-oriented programming language
@@ -232,8 +236,6 @@ cask "insomnia"
cask "jetbrains-toolbox" cask "jetbrains-toolbox"
# Kubernetes IDE # Kubernetes IDE
cask "lens" cask "lens"
# Neovim Client
cask "neovide"
# Reverse proxy, secure introspectable tunnels to localhost # Reverse proxy, secure introspectable tunnels to localhost
cask "ngrok" cask "ngrok"
# Collaboration platform for API development # Collaboration platform for API development
@@ -266,8 +268,12 @@ cask "syntax-highlight"
cask "visual-studio-code" cask "visual-studio-code"
# Multimedia player # Multimedia player
cask "vlc" cask "vlc"
# Spell-checking service for Finnish
cask "voikkospellservice"
# Rust-based terminal # Rust-based terminal
cask "warp" cask "warp"
# View output from scripts in the menu bar
cask "xbar"
mas "1Password for Safari", id: 1569813296 mas "1Password for Safari", id: 1569813296
mas "Flow", id: 1423210932 mas "Flow", id: 1423210932
mas "GarageBand", id: 682658836 mas "GarageBand", id: 682658836
@@ -275,4 +281,5 @@ mas "iMovie", id: 408981434
mas "Keynote", id: 409183694 mas "Keynote", id: 409183694
mas "Numbers", id: 409203825 mas "Numbers", id: 409203825
mas "Pages", id: 409201541 mas "Pages", id: 409201541
mas "pullBar", id: 1601913905
mas "Tailscale", id: 1475387142 mas "Tailscale", id: 1475387142

View File

@@ -4,6 +4,7 @@
*.cache *.cache
*~ *~
*-secret
__secret __secret
__ignored __ignored
__test_*.php __test_*.php

View File

@@ -392,6 +392,9 @@ ks('n', '<leader>sw', tl.grep_string, { desc = '[S]earch current [W]ord' })
ks('n', '<leader>sg', tl.live_grep, { desc = '[S]earch by [G]rep' }) ks('n', '<leader>sg', tl.live_grep, { desc = '[S]earch by [G]rep' })
ks('n', '<leader>sd', tl.diagnostics, { desc = '[S]earch [D]iagnostics' }) ks('n', '<leader>sd', tl.diagnostics, { desc = '[S]earch [D]iagnostics' })
-- Add harpoon to telescope
require("telescope").load_extension('harpoon')
-- [[ Configure Treesitter ]] -- [[ Configure Treesitter ]]
-- See `:help nvim-treesitter` -- See `:help nvim-treesitter`
require('nvim-treesitter.configs').setup { require('nvim-treesitter.configs').setup {

View File

@@ -59,6 +59,13 @@ return function(use)
} }
} }
-- harpoon, by ThePrimeagen
-- https://github.com/ThePrimeagen/harpoon
use {
"ThePrimeagen/harpoon",
requires = { { "nvim-lua/plenary.nvim" } }
}
-- An asynchronous linter plugin for Neovim complementary to -- An asynchronous linter plugin for Neovim complementary to
-- the built-in Language Server Protocol support. -- the built-in Language Server Protocol support.
-- https://github.com/mfussenegger/nvim-lint -- https://github.com/mfussenegger/nvim-lint
@@ -197,4 +204,7 @@ return function(use)
requires = { "jose-elias-alvarez/null-ls.nvim" } requires = { "jose-elias-alvarez/null-ls.nvim" }
} }
-- WakaTime Support
use { "wakatime/vim-wakatime" }
end end

View File

@@ -84,6 +84,7 @@ function section_brew
--describe && msg_done "🎉 Done!" --describe && msg_done "🎉 Done!"
;; ;;
autoupdate) autoupdate)
brew autoupdate delete
brew autoupdate start 43200 --upgrade --cleanup --immediate brew autoupdate start 43200 --upgrade --cleanup --immediate
;; ;;
*) *)
@@ -115,18 +116,7 @@ function section_dotfiles
;; ;;
shfmt) shfmt)
# Format shell scripts according to following rules. # Format shell scripts according to following rules.
shfmt \ shfmt -fn -l -w -i 2 -ci -sr -bn "$DOTFILES"
--find \
--list \
--write \
--diff \
--simplify \
--indent 2 \
--binary-next-line \
--case-indent \
--space-redirects \
--func-next-line \
"$DOTFILES"
;; ;;
*) *)
menu_section "$USAGE_PREFIX" "link | update | shfmt" menu_section "$USAGE_PREFIX" "link | update | shfmt"

View File

@@ -20,7 +20,8 @@
# #
# Simple function to show usage information, and exit. # Simple function to show usage information, and exit.
# #
usage() { usage()
{
echo "Usage: $0 [-d] [-p 443] domain1.org domain2.com .. domainN" echo "Usage: $0 [-d] [-p 443] domain1.org domain2.com .. domainN"
exit 0 exit 0
} }

View File

@@ -75,7 +75,6 @@ handle_file_ln "$HOME/.dotfiles/config/functions" "$HOME/.config/functions"
handle_file_ln "$HOME/.dotfiles/config/gh/config.yml" "$HOME/.config/gh/config.yml" handle_file_ln "$HOME/.dotfiles/config/gh/config.yml" "$HOME/.config/gh/config.yml"
handle_file_ln "$HOME/.dotfiles/config/git/config" "$HOME/.config/git/config" handle_file_ln "$HOME/.dotfiles/config/git/config" "$HOME/.config/git/config"
handle_file_ln "$HOME/.dotfiles/config/git/gitignore" "$HOME/.config/git/gitignore" handle_file_ln "$HOME/.dotfiles/config/git/gitignore" "$HOME/.config/git/gitignore"
handle_file_ln "$HOME/.dotfiles/config/nvim/after/plugin/defaults.lua" "$HOME/.config/nvim/after/plugin/defaults.lua"
handle_file_ln "$HOME/.dotfiles/config/nvim/init.lua" "$HOME/.config/nvim/init.lua" handle_file_ln "$HOME/.dotfiles/config/nvim/init.lua" "$HOME/.config/nvim/init.lua"
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/custom/plugins.lua" "$HOME/.config/nvim/lua/custom/plugins.lua" handle_file_ln "$HOME/.dotfiles/config/nvim/lua/custom/plugins.lua" "$HOME/.config/nvim/lua/custom/plugins.lua"
handle_file_ln "$HOME/.dotfiles/config/nvim/plugin/packer_compiled.lua" "$HOME/.config/nvim/plugin/packer_compiled.lua" handle_file_ln "$HOME/.dotfiles/config/nvim/plugin/packer_compiled.lua" "$HOME/.config/nvim/plugin/packer_compiled.lua"

View File

@@ -12,77 +12,95 @@ CLR_BLUE='\033[1;34m'
CLR_RESET="\033[0m" CLR_RESET="\033[0m"
# -- Helpers -- # # -- Helpers -- #
function __log_marker() { function __log_marker()
{
echo -e "${CLR_BLUE}${CLR_RESET}" echo -e "${CLR_BLUE}${CLR_RESET}"
} }
function __log_marker_ok() { function __log_marker_ok()
{
echo -e "${CLR_GREEN}${CLR_RESET}" echo -e "${CLR_GREEN}${CLR_RESET}"
} }
function __log_marker_ok_blue() { function __log_marker_ok_blue()
{
echo -e "${CLR_BLUE}${CLR_RESET}" echo -e "${CLR_BLUE}${CLR_RESET}"
} }
function __log_marker_warn() { function __log_marker_warn()
{
echo -e "${CLR_YELLOW}${CLR_RESET}" echo -e "${CLR_YELLOW}${CLR_RESET}"
} }
function __log_marker_err() { function __log_marker_err()
{
echo -e "${CLR_RED}${CLR_RESET}" echo -e "${CLR_RED}${CLR_RESET}"
} }
function __log_indent() { function __log_indent()
{
echo " " echo " "
} }
# -- Log -- # # -- Log -- #
function msg() { function msg()
{
echo -e "$(__log_marker) $1" echo -e "$(__log_marker) $1"
} }
function msg_done() { function msg_done()
{
echo -e "$(__log_marker) $1 ...$(__log_marker_ok)" echo -e "$(__log_marker) $1 ...$(__log_marker_ok)"
} }
function msg_prompt() { function msg_prompt()
{
echo -e "$(__log_marker) $1" echo -e "$(__log_marker) $1"
} }
function msg_prompt_done() { function msg_prompt_done()
{
echo -e "$(__log_marker) $1 ...$(__log_marker_ok)" echo -e "$(__log_marker) $1 ...$(__log_marker_ok)"
} }
function msg_nested() { function msg_nested()
{
echo -e "$(__log_indent)$(__log_marker) $1" echo -e "$(__log_indent)$(__log_marker) $1"
} }
function msg_nested_done() { function msg_nested_done()
{
echo -e "$(__log_indent)$(__log_marker) $1 ...$(__log_marker_ok)" echo -e "$(__log_indent)$(__log_marker) $1 ...$(__log_marker_ok)"
} }
function msg_run() { function msg_run()
{
echo -e "${CLR_GREEN}$1${CLR_RESET} $2" echo -e "${CLR_GREEN}$1${CLR_RESET} $2"
} }
function msg_ok() { function msg_ok()
{
echo -e "$(__log_marker_ok) $1" echo -e "$(__log_marker_ok) $1"
} }
function msg_warn() { function msg_warn()
{
echo -e "$(__log_marker_warn) $1" echo -e "$(__log_marker_warn) $1"
} }
function msg_err() { function msg_err()
{
echo -e "$(__log_marker_err) $1" echo -e "$(__log_marker_err) $1"
} }
# -- Menu builder -- # # -- Menu builder -- #
function menu_section() { function menu_section()
{
LINE=$(printf '%-18s [ %-15s ]\n' "$1" "$2") LINE=$(printf '%-18s [ %-15s ]\n' "$1" "$2")
echo -e " $(__log_marker) $LINE" echo -e " $(__log_marker) $LINE"
} }
function menu_item() { function menu_item()
{
LINE=$(printf '%-15s %-30s\n' "$1" "$2") LINE=$(printf '%-15s %-30s\n' "$1" "$2")
echo -e "$(__log_indent)$(__log_marker) $LINE" echo -e "$(__log_indent)$(__log_marker) $LINE"
} }

2
zshrc
View File

@@ -48,7 +48,9 @@ function x-load-configs()
# Load the shell dotfiles, and then some: # Load the shell dotfiles, and then some:
for file in ~/.dotfiles/config/{exports,alias,functions}; do for file in ~/.dotfiles/config/{exports,alias,functions}; do
[ -r "$file" ] && [ -f "$file" ] && source "$file" [ -r "$file" ] && [ -f "$file" ] && source "$file"
[ -r "$file-secret" ] && [ -f "$file-secret" ] && source "$file-secret"
[ -r "$file-$HOSTNAME" ] && [ -f "$file-$HOSTNAME" ] && source "$file-$HOSTNAME" [ -r "$file-$HOSTNAME" ] && [ -f "$file-$HOSTNAME" ] && source "$file-$HOSTNAME"
[ -r "$file-$HOSTNAME-secret" ] && [ -f "$file-$HOSTNAME-secret" ] && source "$file-$HOSTNAME-secret"
done done
} }
x-load-configs x-load-configs