mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-03-20 23:06:51 +00:00
Compare commits
17 Commits
3fb9d2a32e
...
26.2.5
| Author | SHA1 | Date | |
|---|---|---|---|
| 443361cddb | |||
| 083d30a0c3 | |||
| 81190c051a | |||
| de773ad68f | |||
| e8725c4b47 | |||
| b8070e2815 | |||
| 9de394d8e9 | |||
| 08de5ea4a6 | |||
| 0e69b7cb16 | |||
| 7c9096d666 | |||
| efd9eebc85 | |||
| fc8db1f5b5 | |||
| 4414e0c3b6 | |||
| abb6c9f615 | |||
| 57b566704e | |||
|
|
4510e62070 | ||
| 959e7c418e |
2
.github/workflows/linters.yml
vendored
2
.github/workflows/linters.yml
vendored
@@ -35,4 +35,4 @@ jobs:
|
|||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Run PR Lint
|
- name: Run PR Lint
|
||||||
uses: ivuorinen/actions/pr-lint@f98ae7cd7d0feb1f9d6b01de0addbb11414cfc73 # v2026.01.21
|
uses: ivuorinen/actions/pr-lint@f371da218e9152e7d29ee39358454e41010c36dc # v2026.02.03
|
||||||
|
|||||||
2
.github/workflows/sync-labels.yml
vendored
2
.github/workflows/sync-labels.yml
vendored
@@ -29,4 +29,4 @@ jobs:
|
|||||||
issues: write
|
issues: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: ivuorinen/actions/sync-labels@f98ae7cd7d0feb1f9d6b01de0addbb11414cfc73 # v2026.01.21
|
- uses: ivuorinen/actions/sync-labels@f371da218e9152e7d29ee39358454e41010c36dc # v2026.02.03
|
||||||
|
|||||||
12
.gitmodules
vendored
12
.gitmodules
vendored
@@ -4,11 +4,6 @@
|
|||||||
url = https://github.com/anishathalye/dotbot.git
|
url = https://github.com/anishathalye/dotbot.git
|
||||||
ignore = dirty
|
ignore = dirty
|
||||||
|
|
||||||
[submodule "dotbot-brew"]
|
|
||||||
path = tools/dotbot-brew
|
|
||||||
url = https://github.com/wren/dotbot-brew.git
|
|
||||||
ignore = dirty
|
|
||||||
|
|
||||||
[submodule "dotbot-include"]
|
[submodule "dotbot-include"]
|
||||||
path = tools/dotbot-include
|
path = tools/dotbot-include
|
||||||
url = https://gitlab.com/gnfzdz/dotbot-include.git
|
url = https://gitlab.com/gnfzdz/dotbot-include.git
|
||||||
@@ -29,11 +24,6 @@
|
|||||||
url = https://github.com/tmux-plugins/tmux-sessionist.git
|
url = https://github.com/tmux-plugins/tmux-sessionist.git
|
||||||
ignore = dirty
|
ignore = dirty
|
||||||
|
|
||||||
[submodule "dotbot-pip"]
|
|
||||||
path = tools/dotbot-pip
|
|
||||||
url = https://github.com/sobolevn/dotbot-pip.git
|
|
||||||
ignore = dirty
|
|
||||||
|
|
||||||
[submodule "tmux/tmux-suspend"]
|
[submodule "tmux/tmux-suspend"]
|
||||||
path = config/tmux/plugins/tmux-suspend
|
path = config/tmux/plugins/tmux-suspend
|
||||||
url = https://github.com/MunifTanjim/tmux-suspend.git
|
url = https://github.com/MunifTanjim/tmux-suspend.git
|
||||||
@@ -63,6 +53,8 @@
|
|||||||
[submodule "tmux/tmux-resurrect"]
|
[submodule "tmux/tmux-resurrect"]
|
||||||
path = config/tmux/plugins/tmux-resurrect
|
path = config/tmux/plugins/tmux-resurrect
|
||||||
url = https://github.com/tmux-plugins/tmux-resurrect.git
|
url = https://github.com/tmux-plugins/tmux-resurrect.git
|
||||||
|
ignore = dirty
|
||||||
[submodule "tmux/catppuccin"]
|
[submodule "tmux/catppuccin"]
|
||||||
path = config/tmux/plugins/catppuccin
|
path = config/tmux/plugins/catppuccin
|
||||||
url = https://github.com/catppuccin/tmux.git
|
url = https://github.com/catppuccin/tmux.git
|
||||||
|
ignore = dirty
|
||||||
|
|||||||
1
.ignore
1
.ignore
@@ -6,6 +6,5 @@ config/tmux/plugins/**
|
|||||||
config/vim/plugged/**
|
config/vim/plugged/**
|
||||||
node_modules
|
node_modules
|
||||||
tools/antidote/**
|
tools/antidote/**
|
||||||
tools/dotbot-brew/**
|
|
||||||
tools/dotbot-include/**
|
tools/dotbot-include/**
|
||||||
tools/dotbot/**
|
tools/dotbot/**
|
||||||
|
|||||||
@@ -5,12 +5,8 @@ git submodule sync --recursive
|
|||||||
# dotbot and plugins
|
# dotbot and plugins
|
||||||
git submodule add --name dotbot \
|
git submodule add --name dotbot \
|
||||||
-f https://github.com/anishathalye/dotbot.git tools/dotbot
|
-f https://github.com/anishathalye/dotbot.git tools/dotbot
|
||||||
git submodule add --name dotbot-brew \
|
|
||||||
-f https://github.com/wren/dotbot-brew.git tools/dotbot-brew
|
|
||||||
git submodule add --name dotbot-include \
|
git submodule add --name dotbot-include \
|
||||||
-f https://gitlab.com/gnfzdz/dotbot-include.git tools/dotbot-include
|
-f https://gitlab.com/gnfzdz/dotbot-include.git tools/dotbot-include
|
||||||
git submodule add --name dotbot-pip \
|
|
||||||
-f https://github.com/sobolevn/dotbot-pip.git tools/dotbot-pip
|
|
||||||
|
|
||||||
# other repos
|
# other repos
|
||||||
git submodule add --name cheat-community \
|
git submodule add --name cheat-community \
|
||||||
@@ -46,26 +42,64 @@ done
|
|||||||
# Mark certain repositories shallow
|
# Mark certain repositories shallow
|
||||||
git config -f .gitmodules submodule.antidote.shallow true
|
git config -f .gitmodules submodule.antidote.shallow true
|
||||||
|
|
||||||
# remove old submodules
|
_log() {
|
||||||
folders=(
|
if command -v msgr > /dev/null 2>&1; then
|
||||||
"config/tmux/plugins/tpm"
|
msgr run_done "$1"
|
||||||
"config/tmux/plugins/tmux"
|
else
|
||||||
"config/tmux/plugins/tmux-menus"
|
echo " [ok] $1"
|
||||||
"tools/dotbot-crontab"
|
fi
|
||||||
"tools/dotbot-snap"
|
}
|
||||||
"config/tmux/plugins/tmux-window-name"
|
|
||||||
"config/tmux/plugins/tmux-sensible"
|
remove_old_submodule() {
|
||||||
"config/tmux/plugins/tmux-mode-indicator"
|
local name="$1" path="$2"
|
||||||
"config/tmux/plugins/tmux-yank"
|
|
||||||
"config/tmux/plugins/tmux-fzf-url"
|
# Remove working tree
|
||||||
"config/nvim-kickstart"
|
if [ -d "$path" ]; then
|
||||||
"local/bin/asdf"
|
rm -rf "$path"
|
||||||
"local/asdf"
|
_log "Removed $path"
|
||||||
"tools/dotbot-asdf"
|
fi
|
||||||
|
|
||||||
|
# Remove stale git index entry
|
||||||
|
git rm --cached "$path" 2> /dev/null || true
|
||||||
|
|
||||||
|
# Remove .git/config section keyed by path
|
||||||
|
git config --remove-section "submodule.$path" 2> /dev/null || true
|
||||||
|
|
||||||
|
# Skip name-based cleanup if no submodule name provided
|
||||||
|
[ -z "$name" ] && return 0
|
||||||
|
|
||||||
|
# Remove .git/config section keyed by name
|
||||||
|
git config --remove-section "submodule.$name" 2> /dev/null || true
|
||||||
|
|
||||||
|
# Remove .git/modules/<name>/ cached repository
|
||||||
|
if [ -d ".git/modules/$name" ]; then
|
||||||
|
rm -rf ".git/modules/$name"
|
||||||
|
_log "Removed .git/modules/$name"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# remove old submodules (name:path pairs)
|
||||||
|
old_submodules=(
|
||||||
|
"tmux/tpm:config/tmux/plugins/tpm"
|
||||||
|
":config/tmux/plugins/tmux"
|
||||||
|
"tmux/tmux-menus:config/tmux/plugins/tmux-menus"
|
||||||
|
"dotbot-crontab:tools/dotbot-crontab"
|
||||||
|
"dotbot-snap:tools/dotbot-snap"
|
||||||
|
"tmux/tmux-window-name:config/tmux/plugins/tmux-window-name"
|
||||||
|
"tmux/tmux-sensible:config/tmux/plugins/tmux-sensible"
|
||||||
|
"tmux/tmux-mode-indicator:config/tmux/plugins/tmux-mode-indicator"
|
||||||
|
"tmux/tmux-yank:config/tmux/plugins/tmux-yank"
|
||||||
|
":config/tmux/plugins/tmux-fzf-url"
|
||||||
|
"nvim-kickstart:config/nvim-kickstart"
|
||||||
|
"asdf:local/bin/asdf"
|
||||||
|
"asdf:local/asdf"
|
||||||
|
"dotbot-asdf:tools/dotbot-asdf"
|
||||||
|
"dotbot-pip:tools/dotbot-pip"
|
||||||
|
"dotbot-brew:tools/dotbot-brew"
|
||||||
)
|
)
|
||||||
|
|
||||||
for folder in "${folders[@]}"; do
|
for entry in "${old_submodules[@]}"; do
|
||||||
[ -d "$folder" ] \
|
name="${entry%%:*}"
|
||||||
&& rm -rf "$folder" \
|
path="${entry#*:}"
|
||||||
&& msgr run_done "Removed old submodule $folder"
|
remove_old_submodule "$name" "$path"
|
||||||
done
|
done
|
||||||
|
|||||||
@@ -7,10 +7,6 @@ export SHARED_SCRIPTS_SOURCED=0
|
|||||||
|
|
||||||
source "$DOTFILES/config/shared.sh"
|
source "$DOTFILES/config/shared.sh"
|
||||||
|
|
||||||
if [ -n "${GHOSTTY_RESOURCES_DIR}" ]; then
|
|
||||||
builtin source "${GHOSTTY_RESOURCES_DIR}/shell-integration/bash/ghostty.bash"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# shellcheck source=../config/fzf/fzf.bash
|
# shellcheck source=../config/fzf/fzf.bash
|
||||||
[ -f "${DOTFILES}/config/fzf/fzf.bash" ] &&
|
[ -f "${DOTFILES}/config/fzf/fzf.bash" ] &&
|
||||||
source "${DOTFILES}/config/fzf/fzf.bash"
|
source "${DOTFILES}/config/fzf/fzf.bash"
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
use node
|
|
||||||
@@ -2,14 +2,14 @@
|
|||||||
-- These globals can be set and accessed:
|
-- These globals can be set and accessed:
|
||||||
--
|
--
|
||||||
globals = {
|
globals = {
|
||||||
"rawrequire",
|
"rawrequire",
|
||||||
}
|
}
|
||||||
|
|
||||||
--
|
--
|
||||||
-- These globals can only be accessed:
|
-- These globals can only be accessed:
|
||||||
--
|
--
|
||||||
read_globals = {
|
read_globals = {
|
||||||
"hs",
|
"hs",
|
||||||
"ls",
|
"ls",
|
||||||
"spoon",
|
"spoon",
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -370,7 +370,7 @@ def infer_type_from_param_name(param_name: str) -> str:
|
|||||||
|
|
||||||
# Function indicators
|
# Function indicators
|
||||||
if (param_name in ["fn", "func", "callback", "handler", "listener",
|
if (param_name in ["fn", "func", "callback", "handler", "listener",
|
||||||
"predicate", "filter", "mapper", "reducer"]):
|
"predicate", "filter", "mapper", "reducer"]):
|
||||||
return "function"
|
return "function"
|
||||||
|
|
||||||
# Number indicators
|
# Number indicators
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://biomejs.dev/schemas/2.3.1/schema.json",
|
"$schema": "https://biomejs.dev/schemas/2.3.11/schema.json",
|
||||||
"vcs": {
|
"vcs": {
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
"clientKind": "git",
|
"clientKind": "git",
|
||||||
|
|||||||
@@ -1,251 +0,0 @@
|
|||||||
# Start AeroSpace at login
|
|
||||||
start-at-login = false
|
|
||||||
|
|
||||||
# Normalizations. See: https://nikitabobko.github.io/AeroSpace/guide#normalization
|
|
||||||
enable-normalization-flatten-containers = true
|
|
||||||
enable-normalization-opposite-orientation-for-nested-containers = true
|
|
||||||
|
|
||||||
# See: https://nikitabobko.github.io/AeroSpace/guide#layouts
|
|
||||||
# The 'accordion-padding' specifies the size of accordion padding
|
|
||||||
# You can set 0 to disable the padding feature
|
|
||||||
accordion-padding = 10
|
|
||||||
|
|
||||||
# Possible values: tiles|accordion
|
|
||||||
default-root-container-layout = 'tiles'
|
|
||||||
|
|
||||||
# Possible values: horizontal|vertical|auto
|
|
||||||
# 'auto' means: wide monitor (anything wider than high) gets horizontal orientation,
|
|
||||||
# tall monitor (anything higher than wide) gets vertical orientation
|
|
||||||
default-root-container-orientation = 'auto'
|
|
||||||
|
|
||||||
# Mouse follows focus when focused monitor changes
|
|
||||||
# Drop it from your config, if you don't like this behavior
|
|
||||||
# See https://nikitabobko.github.io/AeroSpace/guide#on-focus-changed-callbacks
|
|
||||||
# See https://nikitabobko.github.io/AeroSpace/commands#move-mouse
|
|
||||||
# Fallback value (if you omit the key): on-focused-monitor-changed = []
|
|
||||||
on-focused-monitor-changed = ['move-mouse monitor-lazy-center']
|
|
||||||
|
|
||||||
# You can effectively turn off macOS "Hide application" (cmd-h) feature by toggling this flag
|
|
||||||
# Useful if you don't use this macOS feature, but accidentally hit cmd-h or cmd-alt-h key
|
|
||||||
# Also see: https://nikitabobko.github.io/AeroSpace/goodness#disable-hide-app
|
|
||||||
automatically-unhide-macos-hidden-apps = true
|
|
||||||
|
|
||||||
# [[on-window-detected]]
|
|
||||||
# if.app-id = 'com.apple.systempreferences'
|
|
||||||
# if.app-name-regex-substring = 'settings'
|
|
||||||
# if.window-title-regex-substring = 'substring'
|
|
||||||
# if.workspace = 'workspace-name'
|
|
||||||
# if.during-aerospace-startup = true
|
|
||||||
# check-further-callbacks = true
|
|
||||||
# run = ['layout floating', 'move-node-to-workspace S'] # The callback itself
|
|
||||||
|
|
||||||
[[on-window-detected]]
|
|
||||||
if.app-name-regex-substring = 'settings' # All settings
|
|
||||||
run = ['layout floating']
|
|
||||||
|
|
||||||
[[on-window-detected]]
|
|
||||||
if.app-id = 'com.apple.systempreferences' # macOS System Preferences
|
|
||||||
run = ['layout floating']
|
|
||||||
|
|
||||||
[[on-window-detected]]
|
|
||||||
if.app-id = 'com.1password.1password' # 1Password
|
|
||||||
run = ['layout floating']
|
|
||||||
|
|
||||||
[[on-window-detected]]
|
|
||||||
if.app-id = 'org.ferdium.ferdium-app' # Ferdium, has WhatsApp etc.
|
|
||||||
run = ['layout floating']
|
|
||||||
|
|
||||||
[[on-window-detected]]
|
|
||||||
if.app-id = 'com.jetbrains.PhpStorm' # PhpStorm
|
|
||||||
run = ['layout floating']
|
|
||||||
|
|
||||||
[[on-window-detected]]
|
|
||||||
if.app-id = 'com.apple.finder' # Finder
|
|
||||||
run = ['layout floating']
|
|
||||||
|
|
||||||
[[on-window-detected]]
|
|
||||||
if.app-id = 'com.apple.Preview' # Preview
|
|
||||||
run = ['layout floating']
|
|
||||||
|
|
||||||
[[on-window-detected]]
|
|
||||||
if.app-id = 'com.apple.mail' # Mail
|
|
||||||
run = ['layout floating']
|
|
||||||
|
|
||||||
[[on-window-detected]]
|
|
||||||
if.app-id = 'com.DanPristupov.Fork' # Fork
|
|
||||||
run = ['layout floating']
|
|
||||||
|
|
||||||
[[on-window-detected]]
|
|
||||||
if.app-id = 'com.flexibits.fantastical2.mac' # Fantastical
|
|
||||||
run = ['layout floating']
|
|
||||||
|
|
||||||
[[on-window-detected]]
|
|
||||||
if.app-id = 'org.whispersystems.signal-desktop' # Signal
|
|
||||||
run = ['layout floating']
|
|
||||||
|
|
||||||
[[on-window-detected]]
|
|
||||||
if.app-id = 'com.tidal.desktop' # TIDAL
|
|
||||||
run = ['layout floating', 'move-node-to-workspace 2'] # Float and move to workspace 2
|
|
||||||
|
|
||||||
[[on-window-detected]]
|
|
||||||
if.app-id = 'com.apple.TV' # Apple TV app
|
|
||||||
run = ['layout floating']
|
|
||||||
|
|
||||||
[[on-window-detected]]
|
|
||||||
if.app-id = 'com.setapp.DesktopClient' # Setapp
|
|
||||||
run = ['layout floating']
|
|
||||||
|
|
||||||
[[on-window-detected]]
|
|
||||||
if.app-id = 'com.electron.dockerdesktop' # Docker Desktop
|
|
||||||
run = ['layout floating']
|
|
||||||
|
|
||||||
[[on-window-detected]]
|
|
||||||
if.app-id = 'com.tinyspeck.slackmacgap' # Slack
|
|
||||||
run = ['layout floating']
|
|
||||||
|
|
||||||
[[on-window-detected]]
|
|
||||||
if.app-id = 'md.obsidia' # Obsidian
|
|
||||||
run = ['layout floating']
|
|
||||||
|
|
||||||
[[on-window-detected]]
|
|
||||||
if.app-id = 'com.todoist.mac.Todoist' # Todoist
|
|
||||||
run = ['layout floating']
|
|
||||||
|
|
||||||
[[on-window-detected]]
|
|
||||||
if.app-id = 'com.apple.backup.launcher' # TimeMachine
|
|
||||||
run = ['layout floating']
|
|
||||||
|
|
||||||
[[on-window-detected]]
|
|
||||||
if.app-id = 'com.philipyoungg.session-setapp' # Session app (Setapp)
|
|
||||||
run = ['layout floating']
|
|
||||||
|
|
||||||
[[on-window-detected]]
|
|
||||||
if.app-id = 'com.microsoft.rdc.macos' # Remote Desktop
|
|
||||||
run = ['layout floating']
|
|
||||||
|
|
||||||
# Possible values: (qwerty|dvorak)
|
|
||||||
# See https://nikitabobko.github.io/AeroSpace/guide#key-mapping
|
|
||||||
[key-mapping]
|
|
||||||
preset = 'qwerty'
|
|
||||||
|
|
||||||
# Gaps between windows (inner-*) and between monitor edges (outer-*).
|
|
||||||
# Possible values:
|
|
||||||
# - Constant: gaps.outer.top = 8
|
|
||||||
# - Per monitor: gaps.outer.top = [{ monitor.main = 16 }, { monitor."some-pattern" = 32 }, 24]
|
|
||||||
# In this example, 24 is a default value when there is no match.
|
|
||||||
# Monitor pattern is the same as for 'workspace-to-monitor-force-assignment'.
|
|
||||||
# See: https://nikitabobko.github.io/AeroSpace/guide#assign-workspaces-to-monitors
|
|
||||||
[gaps]
|
|
||||||
inner.horizontal = 5
|
|
||||||
inner.vertical = 5
|
|
||||||
outer.top = [{ monitor.'^built-in retina display$' = 0 }, 0]
|
|
||||||
outer.right = 0
|
|
||||||
outer.bottom = 0
|
|
||||||
outer.left = 0
|
|
||||||
|
|
||||||
# 'main' binding mode declaration
|
|
||||||
# See: https://nikitabobko.github.io/AeroSpace/guide#binding-modes
|
|
||||||
# 'main' binding mode must be always presented
|
|
||||||
# Fallback value (if you omit the key): mode.main.binding = {}
|
|
||||||
[mode.main.binding]
|
|
||||||
|
|
||||||
cmd-h = [] # Disable "hide application"
|
|
||||||
cmd-alt-h = [] # Disable "hide others"
|
|
||||||
|
|
||||||
# All possible keys:
|
|
||||||
# - Letters. a, b, c, ..., z
|
|
||||||
# - Numbers. 0, 1, 2, ..., 9
|
|
||||||
# - Keypad numbers. keypad0, keypad1, keypad2, ..., keypad9
|
|
||||||
# - F-keys. f1, f2, ..., f20
|
|
||||||
# - Special keys. minus, equal, period, comma, slash, backslash, quote, semicolon, backtick,
|
|
||||||
# leftSquareBracket, rightSquareBracket, space, enter, esc, backspace, tab
|
|
||||||
# - Keypad special. keypadClear, keypadDecimalMark, keypadDivide, keypadEnter, keypadEqual,
|
|
||||||
# keypadMinus, keypadMultiply, keypadPlus
|
|
||||||
# - Arrows. left, down, up, right
|
|
||||||
|
|
||||||
# All possible modifiers: cmd, alt, ctrl, shift
|
|
||||||
|
|
||||||
# All possible commands: https://nikitabobko.github.io/AeroSpace/commands
|
|
||||||
|
|
||||||
# See: https://nikitabobko.github.io/AeroSpace/commands#exec-and-forget
|
|
||||||
# You can uncomment the following lines to open up terminal with alt + enter shortcut (like in i3)
|
|
||||||
# alt-enter = '''exec-and-forget osascript -e '
|
|
||||||
# tell application "Terminal"
|
|
||||||
# do script
|
|
||||||
# activate
|
|
||||||
# end tell'
|
|
||||||
# '''
|
|
||||||
|
|
||||||
# alt-cmd-shift-f = 'fullscreen'
|
|
||||||
# alt-shift-f = 'layout floating'
|
|
||||||
# alt-shift-tab = 'move-workspace-to-monitor --wrap-around next'
|
|
||||||
|
|
||||||
# See: https://nikitabobko.github.io/AeroSpace/commands#focus
|
|
||||||
alt-h = 'focus left'
|
|
||||||
alt-j = 'focus down'
|
|
||||||
alt-k = 'focus up'
|
|
||||||
alt-l = 'focus right'
|
|
||||||
|
|
||||||
# See: https://nikitabobko.github.io/AeroSpace/commands#workspace
|
|
||||||
alt-shift-1 = 'workspace 1' # Main
|
|
||||||
alt-shift-2 = 'workspace 2' # Media
|
|
||||||
ctrl-shift-1 = 'move-node-to-workspace 1' # Move node to Main
|
|
||||||
ctrl-shift-2 = 'move-node-to-workspace 2' # Move node to Media
|
|
||||||
|
|
||||||
alt-shift-tab = 'workspace-back-and-forth' # Switch between workspaces
|
|
||||||
ctrl-shift-tab = 'move-workspace-to-monitor --wrap-around prev'
|
|
||||||
|
|
||||||
# See: https://nikitabobko.github.io/AeroSpace/commands#mode
|
|
||||||
# See: https://nikitabobko.github.io/AeroSpace/guide#binding-modes
|
|
||||||
alt-a = 'mode apps'
|
|
||||||
alt-s = 'mode service'
|
|
||||||
alt-m = 'mode move'
|
|
||||||
|
|
||||||
# ╭──────────────────────────────────────────────────────────╮
|
|
||||||
# │ alt-m │
|
|
||||||
# ╰──────────────────────────────────────────────────────────╯
|
|
||||||
[mode.move.binding]
|
|
||||||
esc = ['reload-config', 'mode main']
|
|
||||||
# See: https://nikitabobko.github.io/AeroSpace/commands#move-node-to-workspace
|
|
||||||
1 = ['move-node-to-workspace 1 --focus-follows-window']
|
|
||||||
2 = ['move-node-to-workspace 2 --focus-follows-window']
|
|
||||||
# See: https://nikitabobko.github.io/AeroSpace/commands#move
|
|
||||||
h = 'move left'
|
|
||||||
j = 'move down'
|
|
||||||
k = 'move up'
|
|
||||||
l = 'move right'
|
|
||||||
# See: https://nikitabobko.github.io/AeroSpace/commands#join-with
|
|
||||||
shift-h = 'join-with left'
|
|
||||||
shift-j = 'join-with down'
|
|
||||||
shift-k = 'join-with up'
|
|
||||||
shift-l = 'join-with right'
|
|
||||||
# https://nikitabobko.github.io/AeroSpace/commands#resize
|
|
||||||
ctrl-h = 'resize smart -70'
|
|
||||||
ctrl-l = 'resize smart +70'
|
|
||||||
shift-left = 'resize smart +70'
|
|
||||||
shift-right = 'resize smart -70'
|
|
||||||
# https://nikitabobko.github.io/AeroSpace/commands#flatten-workspace-tree
|
|
||||||
r = ['flatten-workspace-tree', 'mode main'] # reset layout
|
|
||||||
|
|
||||||
# ╭──────────────────────────────────────────────────────────╮
|
|
||||||
# │ alt-a │
|
|
||||||
# ╰──────────────────────────────────────────────────────────╯
|
|
||||||
[mode.apps.binding]
|
|
||||||
esc = ['reload-config', 'mode main']
|
|
||||||
b = ['exec-and-forget open -a /Applications/Brave Browser.app', 'mode main'] # Browser
|
|
||||||
c = ['exec-and-forget open -a /Applications/Ferdium.app', 'mode main'] # Chat
|
|
||||||
g = ['exec-and-forget open -a /Applications/Ghostty.app', 'mode main'] # Ghostty
|
|
||||||
o = ['exec-and-forget open -a /Applications/Obsidian.app', 'mode main'] # Obsidian
|
|
||||||
s = ['exec-and-forget open -a /Applications/Slack.app', 'mode main'] # Slack
|
|
||||||
t = ['exec-and-forget open -a /Applications/TIDAL.app', 'mode main'] # Tidal
|
|
||||||
w = ['exec-and-forget open -a /Applications/WezTerm.app', 'mode main'] # WezTerm
|
|
||||||
|
|
||||||
# ╭──────────────────────────────────────────────────────────╮
|
|
||||||
# │ alt-s │
|
|
||||||
# ╰──────────────────────────────────────────────────────────╯
|
|
||||||
[mode.service.binding]
|
|
||||||
esc = ['reload-config', 'mode main'] # reload config
|
|
||||||
r = ['flatten-workspace-tree', 'mode main'] # reset layout
|
|
||||||
# See: https://nikitabobko.github.io/AeroSpace/commands#layout
|
|
||||||
f = ['layout floating tiling', 'mode main'] # Toggle between floating and tiling layout
|
|
||||||
backspace = ['close-all-windows-but-current', 'mode main']
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
---
|
|
||||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/aquaproj/aqua/main/json-schema/aqua-yaml.json
|
|
||||||
# aqua - Declarative CLI Version Manager
|
|
||||||
# https://aquaproj.github.io/
|
|
||||||
# checksum:
|
|
||||||
# enabled: true
|
|
||||||
# require_checksum: true
|
|
||||||
# supported_envs:
|
|
||||||
# - all
|
|
||||||
registries:
|
|
||||||
- type: standard
|
|
||||||
ref: v4.346.0 # renovate: depName=aquaproj/aqua-registry
|
|
||||||
packages:
|
|
||||||
- name: cli/cli
|
|
||||||
version: 'v2.69.0'
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
# See the docs for explanations: https://asdf-vm.com/manage/configuration.html
|
|
||||||
|
|
||||||
legacy_version_file=yes
|
|
||||||
use_release_candidates=no
|
|
||||||
concurrency=auto
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
bundler
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
1password-cli https://github.com/NeoHsu/asdf-1password-cli.git f5d5aab
|
|
||||||
age https://github.com/threkk/asdf-age.git 396bdf6
|
|
||||||
asdf-plugin-manager https://github.com/asdf-community/asdf-plugin-manager.git b5862c1
|
|
||||||
direnv https://github.com/asdf-community/asdf-direnv.git 6ff3dbe
|
|
||||||
dotenv-linter https://github.com/wesleimp/asdf-dotenv-linter.git 1369f53
|
|
||||||
editorconfig-checker https://github.com/gabitchov/asdf-editorconfig-checker.git 585c1d5
|
|
||||||
fd https://gitlab.com/wt0f/asdf-fd.git 17d56e0
|
|
||||||
github-cli https://github.com/bartlomiejdanek/asdf-github-cli.git e0605b7
|
|
||||||
golang https://github.com/asdf-community/asdf-golang.git e2527a3
|
|
||||||
hadolint https://github.com/devlincashman/asdf-hadolint.git c8eb88b
|
|
||||||
kubectl https://github.com/asdf-community/asdf-kubectl.git 2fb3b57
|
|
||||||
pre-commit https://github.com/jonathanmorley/asdf-pre-commit.git 26bfc42
|
|
||||||
ripgrep https://gitlab.com/wt0f/asdf-ripgrep.git e836665
|
|
||||||
rust https://github.com/code-lever/asdf-rust.git 95acf4f
|
|
||||||
shellcheck https://github.com/luizm/asdf-shellcheck.git 66200ff
|
|
||||||
shfmt https://github.com/luizm/asdf-shfmt.git a42c5ff
|
|
||||||
terragrunt https://github.com/ohmer/asdf-terragrunt.git 29f2935
|
|
||||||
tf-summarize https://github.com/adamcrews/asdf-tf-summarize.git 880ad26
|
|
||||||
yamllint https://github.com/ericcornelissen/asdf-yamllint.git e4cfb17
|
|
||||||
yq https://github.com/sudermanjr/asdf-yq.git 772992f
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
[global]
|
|
||||||
disable_stdin = false
|
|
||||||
load_dotenv = true
|
|
||||||
hide_env_diff = false
|
|
||||||
|
|
||||||
[whitelist]
|
|
||||||
prefix = [
|
|
||||||
"~/Code/"
|
|
||||||
]
|
|
||||||
exact = [
|
|
||||||
"~/.dotfiles/.envrc"
|
|
||||||
]
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
### Do not edit. This was autogenerated by 'asdf direnv setup' ###
|
|
||||||
# shellcheck shell=bash
|
|
||||||
use_asdf()
|
|
||||||
{
|
|
||||||
source_env "$(asdf direnv envrc "$@")"
|
|
||||||
}
|
|
||||||
@@ -348,12 +348,6 @@ export COMPOSER_HOME="$XDG_STATE_HOME/composer"
|
|||||||
export COMPOSER_BIN="$COMPOSER_HOME/vendor/bin"
|
export COMPOSER_BIN="$COMPOSER_HOME/vendor/bin"
|
||||||
export PATH="$COMPOSER_BIN:$PATH"
|
export PATH="$COMPOSER_BIN:$PATH"
|
||||||
|
|
||||||
# direnv, https://direnv.net/
|
|
||||||
# https://direnv.net/docs/hook.html
|
|
||||||
# Set the hook to show the direnv message in a different color
|
|
||||||
# export DIRENV_LOG_FORMAT=$'\033[2mdirenv: %s\033[0m'
|
|
||||||
export DIRENV_LOG_FORMAT=
|
|
||||||
|
|
||||||
# docker, https://docs.docker.com/engine/reference/commandline/cli/
|
# docker, https://docs.docker.com/engine/reference/commandline/cli/
|
||||||
msg "Setting up Docker configuration"
|
msg "Setting up Docker configuration"
|
||||||
export DOCKER_CONFIG="${XDG_CONFIG_HOME}/docker"
|
export DOCKER_CONFIG="${XDG_CONFIG_HOME}/docker"
|
||||||
@@ -410,11 +404,6 @@ x-have pyenv && eval "$(pyenv init -)"
|
|||||||
msg "Setting up Rust/Cargo configuration"
|
msg "Setting up Rust/Cargo configuration"
|
||||||
export RUST_WITHOUT=rust-docs
|
export RUST_WITHOUT=rust-docs
|
||||||
|
|
||||||
# screen
|
|
||||||
# https://www.gnu.org/software/screen/manual/screen.html
|
|
||||||
msg "Setting up screen configuration"
|
|
||||||
export SCREENRC="$XDG_CONFIG_HOME/misc/screenrc"
|
|
||||||
|
|
||||||
# sonarlint
|
# sonarlint
|
||||||
# https://www.sonarlint.org/
|
# https://www.sonarlint.org/
|
||||||
msg "Setting up Sonarlint configuration"
|
msg "Setting up Sonarlint configuration"
|
||||||
@@ -442,9 +431,6 @@ export ZSH_TMUX_UNICODE=true
|
|||||||
export ZSH_TMUX_AUTOQUIT=false
|
export ZSH_TMUX_AUTOQUIT=false
|
||||||
export ZSH_TMUX_DEFAULT_SESSION_NAME=main
|
export ZSH_TMUX_DEFAULT_SESSION_NAME=main
|
||||||
|
|
||||||
# tms, https://github.com/jrmoulton/tmux-sessionizer
|
|
||||||
export TMS_CONFIG_FILE="${XDG_CONFIG_HOME}/tms/config.toml"
|
|
||||||
|
|
||||||
# wakatime, https://github.com/wakatime/wakatime-cli
|
# wakatime, https://github.com/wakatime/wakatime-cli
|
||||||
msg "Setting up Wakatime configuration"
|
msg "Setting up Wakatime configuration"
|
||||||
export WAKATIME_HOME="$XDG_STATE_HOME/wakatime"
|
export WAKATIME_HOME="$XDG_STATE_HOME/wakatime"
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ fi
|
|||||||
export PATH="$HOME/.local/go/bin:$PATH"
|
export PATH="$HOME/.local/go/bin:$PATH"
|
||||||
|
|
||||||
alias logrotate='/usr/sbin/logrotate -s "$HOME/logs/state"'
|
alias logrotate='/usr/sbin/logrotate -s "$HOME/logs/state"'
|
||||||
alias nano='nano -wS -$'
|
|
||||||
alias gpg=gpg2
|
alias gpg=gpg2
|
||||||
|
|
||||||
ACME_PATH="$HOME/.acme.sh"
|
ACME_PATH="$HOME/.acme.sh"
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
/Applications/OrbStack.app/Contents/MacOS/../Resources/completions/fish/kubectl.fish
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
/Applications/OrbStack.app/Contents/MacOS/../Resources/completions/fish/orbctl.fish
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
[General]
|
|
||||||
ApplicationUpdateChannel=release
|
|
||||||
CheckApplicatonUpdates=true
|
|
||||||
FirmwareUpdateChannel=release
|
|
||||||
LastFolderUrl=/Users/ivuorinen
|
|
||||||
ShowHiddenFiles=false
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
# vim: ft=ghostty
|
|
||||||
theme = "light:tokyonight-day,dark:tokyonight-storm"
|
|
||||||
font-family = "JetBrainsMono Nerd Font Mono"
|
|
||||||
|
|
||||||
background-blur-radius = 15
|
|
||||||
background-opacity = 0.95
|
|
||||||
|
|
||||||
clipboard-read = allow
|
|
||||||
clipboard-write = allow
|
|
||||||
cursor-style = bar
|
|
||||||
custom-shader-animation = true
|
|
||||||
gtk-single-instance = true
|
|
||||||
mouse-hide-while-typing = true
|
|
||||||
shell-integration-features = true
|
|
||||||
window-theme = system
|
|
||||||
@@ -260,8 +260,6 @@ brew "php@8.2", link: true
|
|||||||
brew "php@8.3"
|
brew "php@8.3"
|
||||||
# Pins GitHub Actions to full hashes and versions
|
# Pins GitHub Actions to full hashes and versions
|
||||||
brew "pinact"
|
brew "pinact"
|
||||||
# Execute binaries from Python packages in isolated environments
|
|
||||||
brew "pipx"
|
|
||||||
# Python version management
|
# Python version management
|
||||||
brew "pyenv"
|
brew "pyenv"
|
||||||
# Migrate pip packages from one Python version to another
|
# Migrate pip packages from one Python version to another
|
||||||
|
|||||||
@@ -1,54 +0,0 @@
|
|||||||
# Beware! This file is rewritten by htop when settings are changed in the interface.
|
|
||||||
# The parser is also very primitive, and not human-friendly.
|
|
||||||
htop_version=3.4.1
|
|
||||||
config_reader_min_version=3
|
|
||||||
fields=0 48 17 18 38 39 2 46 47 49 1
|
|
||||||
hide_kernel_threads=1
|
|
||||||
hide_userland_threads=0
|
|
||||||
hide_running_in_container=0
|
|
||||||
shadow_other_users=0
|
|
||||||
show_thread_names=0
|
|
||||||
show_program_path=1
|
|
||||||
highlight_base_name=0
|
|
||||||
highlight_deleted_exe=1
|
|
||||||
shadow_distribution_path_prefix=0
|
|
||||||
highlight_megabytes=1
|
|
||||||
highlight_threads=1
|
|
||||||
highlight_changes=0
|
|
||||||
highlight_changes_delay_secs=5
|
|
||||||
find_comm_in_cmdline=1
|
|
||||||
strip_exe_from_cmdline=1
|
|
||||||
show_merged_command=0
|
|
||||||
header_margin=1
|
|
||||||
screen_tabs=1
|
|
||||||
detailed_cpu_time=0
|
|
||||||
cpu_count_from_one=0
|
|
||||||
show_cpu_usage=1
|
|
||||||
show_cpu_frequency=0
|
|
||||||
show_cached_memory=1
|
|
||||||
update_process_names=0
|
|
||||||
account_guest_in_cpu_meter=0
|
|
||||||
color_scheme=0
|
|
||||||
enable_mouse=1
|
|
||||||
delay=15
|
|
||||||
hide_function_bar=0
|
|
||||||
header_layout=two_50_50
|
|
||||||
column_meters_0=LeftCPUs2 Memory Swap
|
|
||||||
column_meter_modes_0=1 1 1
|
|
||||||
column_meters_1=RightCPUs2 Tasks LoadAverage Uptime
|
|
||||||
column_meter_modes_1=1 2 2 2
|
|
||||||
tree_view=0
|
|
||||||
sort_key=46
|
|
||||||
tree_sort_key=0
|
|
||||||
sort_direction=-1
|
|
||||||
tree_sort_direction=1
|
|
||||||
tree_view_always_by_pid=0
|
|
||||||
all_branches_collapsed=0
|
|
||||||
screen:Main=PID USER PRIORITY NICE M_VIRT M_RESIDENT STATE PERCENT_CPU PERCENT_MEM TIME Command
|
|
||||||
.sort_key=PERCENT_CPU
|
|
||||||
.tree_sort_key=PID
|
|
||||||
.tree_view_always_by_pid=0
|
|
||||||
.tree_view=0
|
|
||||||
.sort_direction=-1
|
|
||||||
.tree_sort_direction=1
|
|
||||||
.all_branches_collapsed=0
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
# 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
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
set tabsize 2
|
|
||||||
18
config/nbrc
18
config/nbrc
@@ -1,18 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
###############################################################################
|
|
||||||
# .nbrc
|
|
||||||
#
|
|
||||||
# Configuration file for `nb`, a command line note-taking, bookmarking,
|
|
||||||
# and knowledge base application with encryption, search, Git-backed syncing,
|
|
||||||
# and more in a single portable script.
|
|
||||||
#
|
|
||||||
# Edit this file manually or manage settings using the `nb settings`
|
|
||||||
# subcommand. Configuration options are set as environment variables, eg:
|
|
||||||
# export NB_ENCRYPTION_TOOL=gpg
|
|
||||||
#
|
|
||||||
# https://github.com/xwmx/nb
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
export NB_DIR="${NB_DIR:-$HOME/.local/state/nb}" # Set by `nb` • Mon May 8 15:25:12 EEST 2023
|
|
||||||
|
|
||||||
export NB_COLOR_THEME="${NB_COLOR_THEME:-unicorn}" # Set by `nb` • Mon May 8 15:41:22 EEST 2023
|
|
||||||
@@ -40,7 +40,8 @@ return {
|
|||||||
operators = {},
|
operators = {},
|
||||||
-- miscs = {}, -- Uncomment to turn off hard-coded styles
|
-- miscs = {}, -- Uncomment to turn off hard-coded styles
|
||||||
},
|
},
|
||||||
lsp_styles = { -- Handles the style of specific lsp hl groups (see `:h lsp-highlight`).
|
-- Style of specific lsp hl groups (`:h lsp-highlight`)
|
||||||
|
lsp_styles = {
|
||||||
virtual_text = {
|
virtual_text = {
|
||||||
errors = { 'italic' },
|
errors = { 'italic' },
|
||||||
hints = { 'italic' },
|
hints = { 'italic' },
|
||||||
@@ -72,7 +73,8 @@ return {
|
|||||||
enabled = true,
|
enabled = true,
|
||||||
indentscope_color = '',
|
indentscope_color = '',
|
||||||
},
|
},
|
||||||
-- For more plugins integrations please scroll down (https://github.com/catppuccin/nvim#integrations)
|
-- More integrations:
|
||||||
|
-- github.com/catppuccin/nvim#integrations
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -115,7 +117,8 @@ return {
|
|||||||
{
|
{
|
||||||
'dmtrKovalenko/fff.nvim',
|
'dmtrKovalenko/fff.nvim',
|
||||||
build = function()
|
build = function()
|
||||||
-- this will download prebuild binary or try to use existing rustup toolchain to build from source
|
-- Downloads prebuild binary or uses rustup
|
||||||
|
-- toolchain to build from source
|
||||||
-- (if you are using lazy you can use gb for rebuilding a plugin if needed)
|
-- (if you are using lazy you can use gb for rebuilding a plugin if needed)
|
||||||
require('fff.download').download_or_build_binary()
|
require('fff.download').download_or_build_binary()
|
||||||
end,
|
end,
|
||||||
@@ -124,7 +127,8 @@ return {
|
|||||||
opts = { -- (optional)
|
opts = { -- (optional)
|
||||||
debug = {
|
debug = {
|
||||||
enabled = true, -- we expect your collaboration at least during the beta
|
enabled = true, -- we expect your collaboration at least during the beta
|
||||||
show_scores = true, -- to help us optimize the scoring system, feel free to share your scores!
|
-- Share scores to help optimize scoring
|
||||||
|
show_scores = true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
-- No need to lazy-load with lazy.nvim.
|
-- No need to lazy-load with lazy.nvim.
|
||||||
|
|||||||
@@ -1,154 +0,0 @@
|
|||||||
# Get editor completions based on the config schema
|
|
||||||
"$schema" = 'https://starship.rs/config-schema.json'
|
|
||||||
|
|
||||||
format = """
|
|
||||||
$os\
|
|
||||||
$directory\
|
|
||||||
$git_branch\
|
|
||||||
$git_state\
|
|
||||||
$git_status\
|
|
||||||
$fill \
|
|
||||||
$battery\
|
|
||||||
$username\
|
|
||||||
$hostname\
|
|
||||||
$aws\
|
|
||||||
$gcloud\
|
|
||||||
$conda\
|
|
||||||
$golang\
|
|
||||||
$nodejs\
|
|
||||||
$php\
|
|
||||||
$python\
|
|
||||||
$package\
|
|
||||||
$line_break\
|
|
||||||
$character"""
|
|
||||||
|
|
||||||
# Timeout for commands executed by starship (in milliseconds).
|
|
||||||
command_timeout = 1500
|
|
||||||
|
|
||||||
[character]
|
|
||||||
success_symbol = "[→](bold green)"
|
|
||||||
error_symbol = "[→](red)"
|
|
||||||
vimcmd_symbol = "[←](green)"
|
|
||||||
|
|
||||||
[aws]
|
|
||||||
symbol = " "
|
|
||||||
format = '[$symbol($profile )(\($region\) )(\[$duration\] )]($style)'
|
|
||||||
|
|
||||||
[cmd_duration]
|
|
||||||
disabled = true
|
|
||||||
|
|
||||||
[directory]
|
|
||||||
read_only = " "
|
|
||||||
style = "blue"
|
|
||||||
before_repo_root_style = "white"
|
|
||||||
truncation_symbol = "…/"
|
|
||||||
|
|
||||||
[docker_context]
|
|
||||||
symbol = " "
|
|
||||||
format = '[$symbol$context]($style) '
|
|
||||||
|
|
||||||
[fill]
|
|
||||||
symbol = '·'
|
|
||||||
style = 'bold black'
|
|
||||||
|
|
||||||
[gcloud]
|
|
||||||
format = '[($symbol)$account(@$domain)(\($region\))]($style) '
|
|
||||||
|
|
||||||
[git_branch]
|
|
||||||
symbol = " "
|
|
||||||
format = '[$symbol$branch(:$remote_branch)]($style) '
|
|
||||||
truncation_length = 20
|
|
||||||
truncation_symbol = '…'
|
|
||||||
ignore_branches = ['master', 'main']
|
|
||||||
|
|
||||||
[git_status]
|
|
||||||
up_to_date = '✓'
|
|
||||||
staged = '[++\($count\)](green)'
|
|
||||||
|
|
||||||
[git_state]
|
|
||||||
format = '\([$state( $progress_current/$progress_total)]($style)\) '
|
|
||||||
style = "bright-black"
|
|
||||||
|
|
||||||
[git_metrics]
|
|
||||||
added_style = 'bold blue'
|
|
||||||
format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
|
|
||||||
disabled = false
|
|
||||||
|
|
||||||
[golang]
|
|
||||||
symbol = " "
|
|
||||||
format = '[$symbol($version )]($style) '
|
|
||||||
|
|
||||||
[hostname]
|
|
||||||
ssh_symbol = " "
|
|
||||||
ssh_only = false
|
|
||||||
format = '[$ssh_symbol](bold blue)[$hostname](bold red) '
|
|
||||||
|
|
||||||
[lua]
|
|
||||||
format = '[$symbol($version )]($style)'
|
|
||||||
|
|
||||||
[nodejs]
|
|
||||||
symbol = " "
|
|
||||||
format = '[$symbol($version )]($style)'
|
|
||||||
version_format = '${major}.${minor}'
|
|
||||||
|
|
||||||
[os]
|
|
||||||
format = "[$symbol]($style) "
|
|
||||||
style = "bold blue"
|
|
||||||
disabled = false
|
|
||||||
|
|
||||||
[os.symbols]
|
|
||||||
Alpaquita = " "
|
|
||||||
Alpine = " "
|
|
||||||
Amazon = " "
|
|
||||||
Android = " "
|
|
||||||
Arch = " "
|
|
||||||
Artix = " "
|
|
||||||
CentOS = " "
|
|
||||||
Debian = " "
|
|
||||||
DragonFly = " "
|
|
||||||
Emscripten = " "
|
|
||||||
EndeavourOS = " "
|
|
||||||
Fedora = " "
|
|
||||||
FreeBSD = " "
|
|
||||||
Garuda = " "
|
|
||||||
Gentoo = " "
|
|
||||||
HardenedBSD = " "
|
|
||||||
Illumos = " "
|
|
||||||
Linux = " "
|
|
||||||
Mabox = " "
|
|
||||||
Macos = " "
|
|
||||||
Manjaro = " "
|
|
||||||
Mariner = " "
|
|
||||||
MidnightBSD = " "
|
|
||||||
Mint = " "
|
|
||||||
NetBSD = " "
|
|
||||||
NixOS = " "
|
|
||||||
OpenBSD = " "
|
|
||||||
openSUSE = " "
|
|
||||||
OracleLinux = " "
|
|
||||||
Pop = " "
|
|
||||||
Raspbian = " "
|
|
||||||
Redhat = " "
|
|
||||||
RedHatEnterprise = " "
|
|
||||||
Redox = " "
|
|
||||||
Solus = " "
|
|
||||||
SUSE = " "
|
|
||||||
Ubuntu = " "
|
|
||||||
Unknown = " "
|
|
||||||
Windows = " "
|
|
||||||
|
|
||||||
[package]
|
|
||||||
symbol = " "
|
|
||||||
format = '[$symbol($version )]($style)'
|
|
||||||
version_format = '${major}.${minor}'
|
|
||||||
|
|
||||||
[php]
|
|
||||||
format = '[$symbol($version )]($style)'
|
|
||||||
version_format = '${major}.${minor}'
|
|
||||||
|
|
||||||
[python]
|
|
||||||
symbol = " "
|
|
||||||
format = "[$virtualenv]($style) "
|
|
||||||
|
|
||||||
[username]
|
|
||||||
format = "[$user]($style) "
|
|
||||||
@@ -1,81 +0,0 @@
|
|||||||
# [Created by task 2.6.2 5/11/2023 09:33:14]
|
|
||||||
# Taskwarrior program configuration file.
|
|
||||||
# For more documentation, see https://taskwarrior.org or try 'man task', 'man task-color',
|
|
||||||
# 'man task-sync' or 'man taskrc'
|
|
||||||
|
|
||||||
# Here is an example of entries that use the default, override and blank values
|
|
||||||
# variable=foo -- By specifying a value, this overrides the default
|
|
||||||
# variable= -- By specifying no value, this means no default
|
|
||||||
# #variable=foo -- By commenting out the line, or deleting it, this uses the default
|
|
||||||
|
|
||||||
# You can also refence environment variables:
|
|
||||||
# variable=$HOME/task
|
|
||||||
# variable=$VALUE
|
|
||||||
|
|
||||||
# Use the command 'task show' to see all defaults and overrides
|
|
||||||
|
|
||||||
# Files
|
|
||||||
data.location=$XDG_DATA_HOME/task/
|
|
||||||
|
|
||||||
# To use the default location of the XDG directories,
|
|
||||||
# move this configuration file from ~/.taskrc to ~/.config/task/taskrc and uncomment below
|
|
||||||
|
|
||||||
#data.location=$XDG_DATA_HOME/task
|
|
||||||
#hooks.location=~/.config/task/hooks
|
|
||||||
|
|
||||||
# Color theme (uncomment one to use)
|
|
||||||
#include light-16.theme
|
|
||||||
#include light-256.theme
|
|
||||||
#include dark-16.theme
|
|
||||||
#include dark-256.theme
|
|
||||||
#include dark-red-256.theme
|
|
||||||
#include dark-green-256.theme
|
|
||||||
#include dark-blue-256.theme
|
|
||||||
#include dark-violets-256.theme
|
|
||||||
#include dark-yellow-green.theme
|
|
||||||
#include dark-gray-256.theme
|
|
||||||
#include dark-gray-blue-256.theme
|
|
||||||
#include solarized-dark-256.theme
|
|
||||||
#include solarized-light-256.theme
|
|
||||||
#include no-color.theme
|
|
||||||
|
|
||||||
weekstart=monday
|
|
||||||
|
|
||||||
news.version=2.6.0
|
|
||||||
|
|
||||||
default.project=Inbox
|
|
||||||
calendar.details=full
|
|
||||||
calendar.holidays=sparse
|
|
||||||
recurrence=on
|
|
||||||
|
|
||||||
uda.taskwarrior-tui.keyconfig.quit=q
|
|
||||||
uda.taskwarrior-tui.keyconfig.refresh=r
|
|
||||||
uda.taskwarrior-tui.keyconfig.go-to-bottom=G
|
|
||||||
uda.taskwarrior-tui.keyconfig.go-to-top=g
|
|
||||||
uda.taskwarrior-tui.keyconfig.down=j
|
|
||||||
uda.taskwarrior-tui.keyconfig.up=k
|
|
||||||
uda.taskwarrior-tui.keyconfig.page-down=J
|
|
||||||
uda.taskwarrior-tui.keyconfig.page-up=K
|
|
||||||
uda.taskwarrior-tui.keyconfig.delete=x
|
|
||||||
uda.taskwarrior-tui.keyconfig.done=d
|
|
||||||
uda.taskwarrior-tui.keyconfig.start-stop=s
|
|
||||||
uda.taskwarrior-tui.keyconfig.quick-tag=t
|
|
||||||
uda.taskwarrior-tui.keyconfig.undo=u
|
|
||||||
uda.taskwarrior-tui.keyconfig.edit=e
|
|
||||||
uda.taskwarrior-tui.keyconfig.modify=m
|
|
||||||
uda.taskwarrior-tui.keyconfig.shell=!
|
|
||||||
uda.taskwarrior-tui.keyconfig.log=l
|
|
||||||
uda.taskwarrior-tui.keyconfig.add=a
|
|
||||||
uda.taskwarrior-tui.keyconfig.annotate=A
|
|
||||||
uda.taskwarrior-tui.keyconfig.filter=/
|
|
||||||
uda.taskwarrior-tui.keyconfig.zoom=z
|
|
||||||
uda.taskwarrior-tui.keyconfig.context-menu=c
|
|
||||||
uda.taskwarrior-tui.keyconfig.next-tab=.
|
|
||||||
uda.taskwarrior-tui.keyconfig.previous-tab=,
|
|
||||||
|
|
||||||
taskd.certificate=$XDG_DATA_HOME/task/private.certificate.pem
|
|
||||||
taskd.key=$XDG_DATA_HOME/task/private.key.pem
|
|
||||||
taskd.ca=$XDG_DATA_HOME/task/ca.cert.pem
|
|
||||||
taskd.server=inthe.am:53589
|
|
||||||
taskd.credentials=inthe_am/ivuorinen/b99a4970-94fb-4fb8-b9fe-e1a8140dd44d
|
|
||||||
taskd.trust=strict
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
[style.description]
|
|
||||||
underline = false
|
|
||||||
bold = false
|
|
||||||
italic = false
|
|
||||||
|
|
||||||
[style.command_name]
|
|
||||||
foreground = "cyan"
|
|
||||||
underline = false
|
|
||||||
bold = false
|
|
||||||
italic = false
|
|
||||||
|
|
||||||
[style.example_text]
|
|
||||||
foreground = "green"
|
|
||||||
underline = false
|
|
||||||
bold = false
|
|
||||||
italic = false
|
|
||||||
|
|
||||||
[style.example_code]
|
|
||||||
foreground = "cyan"
|
|
||||||
underline = false
|
|
||||||
bold = false
|
|
||||||
italic = false
|
|
||||||
|
|
||||||
[style.example_variable]
|
|
||||||
foreground = "cyan"
|
|
||||||
underline = true
|
|
||||||
bold = false
|
|
||||||
italic = false
|
|
||||||
|
|
||||||
[display]
|
|
||||||
compact = false
|
|
||||||
use_pager = false
|
|
||||||
|
|
||||||
[updates]
|
|
||||||
auto_update = false
|
|
||||||
auto_update_interval_hours = 720
|
|
||||||
|
|
||||||
[directories]
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
default_session = "main"
|
|
||||||
display_full_path = true
|
|
||||||
|
|
||||||
[[search_dirs]]
|
|
||||||
path = "~/Code"
|
|
||||||
depth = 3
|
|
||||||
|
|
||||||
[picker_colors]
|
|
||||||
highlight_color = "#31748f"
|
|
||||||
highlight_text_color = "#e0def4"
|
|
||||||
border_color = "#524F67"
|
|
||||||
@@ -1,181 +0,0 @@
|
|||||||
---
|
|
||||||
wtf:
|
|
||||||
colors:
|
|
||||||
background: black
|
|
||||||
border:
|
|
||||||
focusable: darkslateblue
|
|
||||||
focused: orange
|
|
||||||
normal: gray
|
|
||||||
checked: yellow
|
|
||||||
highlight:
|
|
||||||
fore: black
|
|
||||||
back: gray
|
|
||||||
rows:
|
|
||||||
even: yellow
|
|
||||||
odd: white
|
|
||||||
grid:
|
|
||||||
# How _wide_ the columns are, in terminal characters. In this case we have
|
|
||||||
# four columns, each of which are 35 characters wide.
|
|
||||||
columns: [35, 35, 30, 20]
|
|
||||||
# How _high_ the rows are, in terminal lines. In this case we have four rows
|
|
||||||
# that support ten line of text and one of four.
|
|
||||||
rows: [10, 10, 10, 20, 10, 4]
|
|
||||||
refreshInterval: 1
|
|
||||||
openFileUtil: 'open'
|
|
||||||
mods:
|
|
||||||
# You can have multiple widgets of the same type.
|
|
||||||
# The "key" is the name of the widget and the type is the actual
|
|
||||||
# widget you want to implement.
|
|
||||||
europe_time:
|
|
||||||
title: 'Europe'
|
|
||||||
type: clocks
|
|
||||||
colors:
|
|
||||||
rows:
|
|
||||||
even: 'lightblue'
|
|
||||||
odd: 'white'
|
|
||||||
enabled: true
|
|
||||||
locations:
|
|
||||||
GMT: 'Etc/GMT'
|
|
||||||
Amsterdam: 'Europe/Amsterdam'
|
|
||||||
Berlin: 'Europe/Berlin'
|
|
||||||
Barcelona: 'Europe/Madrid'
|
|
||||||
Copenhagen: 'Europe/Copenhagen'
|
|
||||||
London: 'Europe/London'
|
|
||||||
Rome: 'Europe/Rome'
|
|
||||||
Stockholm: 'Europe/Stockholm'
|
|
||||||
position:
|
|
||||||
top: 0
|
|
||||||
left: 0
|
|
||||||
height: 1
|
|
||||||
width: 1
|
|
||||||
refreshInterval: 15
|
|
||||||
sort: 'alphabetical'
|
|
||||||
americas_time:
|
|
||||||
title: 'Americas'
|
|
||||||
type: clocks
|
|
||||||
colors:
|
|
||||||
rows:
|
|
||||||
even: 'lightblue'
|
|
||||||
odd: 'white'
|
|
||||||
enabled: true
|
|
||||||
locations:
|
|
||||||
UTC: 'Etc/UTC'
|
|
||||||
Vancouver: 'America/Vancouver'
|
|
||||||
New_York: 'America/New_York'
|
|
||||||
Sao_Paulo: 'America/Sao_Paulo'
|
|
||||||
Denver: 'America/Denver'
|
|
||||||
Iqaluit: 'America/Iqaluit'
|
|
||||||
Bahamas: 'America/Nassau'
|
|
||||||
Chicago: 'America/Chicago'
|
|
||||||
position:
|
|
||||||
top: 0
|
|
||||||
left: 1
|
|
||||||
height: 1
|
|
||||||
width: 1
|
|
||||||
refreshInterval: 15
|
|
||||||
sort: 'alphabetical'
|
|
||||||
battery:
|
|
||||||
type: power
|
|
||||||
title: '⚡️'
|
|
||||||
enabled: true
|
|
||||||
position:
|
|
||||||
top: 1
|
|
||||||
left: 2
|
|
||||||
height: 1
|
|
||||||
width: 2
|
|
||||||
refreshInterval: 15
|
|
||||||
todolist:
|
|
||||||
type: todo
|
|
||||||
checkedIcon: 'X'
|
|
||||||
colors:
|
|
||||||
checked: gray
|
|
||||||
highlight:
|
|
||||||
fore: 'black'
|
|
||||||
back: 'orange'
|
|
||||||
enabled: true
|
|
||||||
filename: 'todo.yml'
|
|
||||||
position:
|
|
||||||
top: 1
|
|
||||||
left: 0
|
|
||||||
height: 2
|
|
||||||
width: 1
|
|
||||||
refreshInterval: 3600
|
|
||||||
ip:
|
|
||||||
type: ipinfo
|
|
||||||
title: 'My IP'
|
|
||||||
colors:
|
|
||||||
name: 'lightblue'
|
|
||||||
value: 'white'
|
|
||||||
enabled: true
|
|
||||||
position:
|
|
||||||
top: 0
|
|
||||||
left: 2
|
|
||||||
height: 1
|
|
||||||
width: 2
|
|
||||||
refreshInterval: 150
|
|
||||||
security_info:
|
|
||||||
type: security
|
|
||||||
title: 'Staying safe'
|
|
||||||
enabled: true
|
|
||||||
position:
|
|
||||||
top: 1
|
|
||||||
left: 1
|
|
||||||
height: 1
|
|
||||||
width: 1
|
|
||||||
refreshInterval: 3600
|
|
||||||
readme:
|
|
||||||
type: textfile
|
|
||||||
enabled: true
|
|
||||||
filePaths:
|
|
||||||
- '~/.config/wtf/config.yml'
|
|
||||||
format: true
|
|
||||||
formatStyle: 'monokai'
|
|
||||||
position:
|
|
||||||
top: 3
|
|
||||||
left: 0
|
|
||||||
height: 1
|
|
||||||
width: 1
|
|
||||||
refreshInterval: 15
|
|
||||||
news:
|
|
||||||
type: hackernews
|
|
||||||
title: 'HackerNews'
|
|
||||||
enabled: true
|
|
||||||
numberOfStories: 10
|
|
||||||
position:
|
|
||||||
top: 3
|
|
||||||
left: 1
|
|
||||||
height: 1
|
|
||||||
width: 3
|
|
||||||
storyType: top
|
|
||||||
refreshInterval: 900
|
|
||||||
resources:
|
|
||||||
type: resourceusage
|
|
||||||
enabled: true
|
|
||||||
position:
|
|
||||||
top: 4
|
|
||||||
left: 0
|
|
||||||
height: 2
|
|
||||||
width: 1
|
|
||||||
refreshInterval: 1
|
|
||||||
uptime:
|
|
||||||
type: cmdrunner
|
|
||||||
args: []
|
|
||||||
cmd: 'uptime'
|
|
||||||
enabled: true
|
|
||||||
position:
|
|
||||||
top: 5
|
|
||||||
left: 1
|
|
||||||
height: 1
|
|
||||||
width: 3
|
|
||||||
refreshInterval: 30
|
|
||||||
disks:
|
|
||||||
type: cmdrunner
|
|
||||||
cmd: 'df'
|
|
||||||
args: ['-h']
|
|
||||||
enabled: true
|
|
||||||
position:
|
|
||||||
top: 4
|
|
||||||
left: 1
|
|
||||||
height: 1
|
|
||||||
width: 3
|
|
||||||
refreshInterval: 3600
|
|
||||||
@@ -20,7 +20,6 @@ yabai -m config \
|
|||||||
window_shadow float
|
window_shadow float
|
||||||
|
|
||||||
# apps to not manage (ignore)
|
# apps to not manage (ignore)
|
||||||
# TODO: add apps from aerospace config to here
|
|
||||||
# list active apps:
|
# list active apps:
|
||||||
# > yabai -m query --windows | jq .[].app | sort | uniq
|
# > yabai -m query --windows | jq .[].app | sort | uniq
|
||||||
yabai -m rule --add app="1Password" manage=off
|
yabai -m rule --add app="1Password" manage=off
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
formatter:
|
|
||||||
type: basic
|
|
||||||
indent: 2
|
|
||||||
retain_line_breaks: false
|
|
||||||
disallow_anchors: false
|
|
||||||
max_line_length: 0
|
|
||||||
scan_folded_as_literal: false
|
|
||||||
indentless_arrays: false
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
---
|
|
||||||
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
|
|
||||||
@@ -37,7 +37,6 @@ zdharma-continuum/fast-syntax-highlighting
|
|||||||
|
|
||||||
# Add some plugins that are not in OMZ
|
# Add some plugins that are not in OMZ
|
||||||
jreese/zsh-titles
|
jreese/zsh-titles
|
||||||
yuki-ycino/tms
|
|
||||||
|
|
||||||
# This needs to be last bundle
|
# This needs to be last bundle
|
||||||
# zsh-users/zsh-syntax-highlighting
|
# zsh-users/zsh-syntax-highlighting
|
||||||
|
|||||||
@@ -28,7 +28,6 @@ _dfm()
|
|||||||
|
|
||||||
sections=(
|
sections=(
|
||||||
'install:Installation commands'
|
'install:Installation commands'
|
||||||
'asdf:ASDF version manager commands'
|
|
||||||
'brew:Homebrew package manager commands'
|
'brew:Homebrew package manager commands'
|
||||||
'check:System check commands'
|
'check:System check commands'
|
||||||
'dotfiles:Dotfiles management commands'
|
'dotfiles:Dotfiles management commands'
|
||||||
@@ -69,24 +68,6 @@ _dfm()
|
|||||||
_describe 'install commands' install_cmds
|
_describe 'install commands' install_cmds
|
||||||
;;
|
;;
|
||||||
|
|
||||||
asdf)
|
|
||||||
local -a asdf_cmds
|
|
||||||
asdf_cmds=(
|
|
||||||
'current:Show current versions'
|
|
||||||
'global:Show global versions'
|
|
||||||
'installed:Show installed versions'
|
|
||||||
'plugins-update:Update all plugins'
|
|
||||||
'plugins-install:Install plugins from configuration'
|
|
||||||
'plugins-remove:Remove installed plugins'
|
|
||||||
'reset:Reset plugins'
|
|
||||||
'fix-tool-versions:Remove uninstalled plugins from .tool-versions'
|
|
||||||
'versions:Show versions'
|
|
||||||
'where:Show where'
|
|
||||||
'which:Show which'
|
|
||||||
)
|
|
||||||
_describe 'asdf commands' asdf_cmds
|
|
||||||
;;
|
|
||||||
|
|
||||||
brew)
|
brew)
|
||||||
local -a brew_cmds
|
local -a brew_cmds
|
||||||
brew_cmds=(
|
brew_cmds=(
|
||||||
|
|||||||
@@ -1,66 +0,0 @@
|
|||||||
# aerospace keybindings
|
|
||||||
|
|
||||||
## main
|
|
||||||
|
|
||||||
| Key | Command(s) and actions |
|
|
||||||
| -------------- | -------------------------------------------- |
|
|
||||||
| alt-a | mode apps |
|
|
||||||
| alt-h | focus left |
|
|
||||||
| alt-j | focus down |
|
|
||||||
| alt-k | focus up |
|
|
||||||
| alt-l | focus right |
|
|
||||||
| alt-m | mode move |
|
|
||||||
| alt-s | mode service |
|
|
||||||
| alt-shift-1 | workspace 1 |
|
|
||||||
| alt-shift-2 | workspace 2 |
|
|
||||||
| alt-shift-tab | workspace-back-and-forth |
|
|
||||||
| ctrl-shift-1 | move-node-to-workspace 1 |
|
|
||||||
| ctrl-shift-2 | move-node-to-workspace 2 |
|
|
||||||
| ctrl-shift-tab | move-workspace-to-monitor --wrap-around prev |
|
|
||||||
|
|
||||||
## apps
|
|
||||||
|
|
||||||
| Key | Command(s) and actions |
|
|
||||||
| --- | ------------------------------------------------------------------ |
|
|
||||||
| b | exec-and-forget open -a /Applications/Brave Browser.app; mode main |
|
|
||||||
| c | exec-and-forget open -a /Applications/Ferdium.app; mode main |
|
|
||||||
| esc | reload-config; mode main |
|
|
||||||
| g | exec-and-forget open -a /Applications/Ghostty.app; mode main |
|
|
||||||
| o | exec-and-forget open -a /Applications/Obsidian.app; mode main |
|
|
||||||
| s | exec-and-forget open -a /Applications/Slack.app; mode main |
|
|
||||||
| t | exec-and-forget open -a /Applications/TIDAL.app; mode main |
|
|
||||||
| w | exec-and-forget open -a /Applications/WezTerm.app; mode main |
|
|
||||||
|
|
||||||
## move
|
|
||||||
|
|
||||||
| Key | Command(s) and actions |
|
|
||||||
| ----------- | ----------------------------------------------- |
|
|
||||||
| 1 | move-node-to-workspace 1 --focus-follows-window |
|
|
||||||
| 2 | move-node-to-workspace 2 --focus-follows-window |
|
|
||||||
| ctrl-h | resize smart -70 |
|
|
||||||
| ctrl-l | resize smart +70 |
|
|
||||||
| esc | reload-config; mode main |
|
|
||||||
| h | move left |
|
|
||||||
| j | move down |
|
|
||||||
| k | move up |
|
|
||||||
| l | move right |
|
|
||||||
| r | flatten-workspace-tree; mode main |
|
|
||||||
| shift-h | join-with left |
|
|
||||||
| shift-j | join-with down |
|
|
||||||
| shift-k | join-with up |
|
|
||||||
| shift-l | join-with right |
|
|
||||||
| shift-left | resize smart +70 |
|
|
||||||
| shift-right | resize smart -70 |
|
|
||||||
|
|
||||||
## service
|
|
||||||
|
|
||||||
| Key | Command(s) and actions |
|
|
||||||
| --------- | ---------------------------------------- |
|
|
||||||
| backspace | close-all-windows-but-current; mode main |
|
|
||||||
| esc | reload-config; mode main |
|
|
||||||
| f | layout floating tiling; mode main |
|
|
||||||
| r | flatten-workspace-tree; mode main |
|
|
||||||
|
|
||||||
File generated: 2025-01-15 13:32:41
|
|
||||||
|
|
||||||
Config file: [config/aerospace/aerospace.toml](./../config/aerospace/aerospace.toml)
|
|
||||||
6
install
6
install
@@ -15,10 +15,7 @@ git submodule update --init --recursive "${DOTBOT_DIR}"
|
|||||||
|
|
||||||
"${DOTBOT_BIN_PATH}" \
|
"${DOTBOT_BIN_PATH}" \
|
||||||
-d "${BASEDIR}" \
|
-d "${BASEDIR}" \
|
||||||
--plugin-dir=tools/dotbot-asdf \
|
|
||||||
--plugin-dir=tools/dotbot-brew \
|
|
||||||
--plugin-dir=tools/dotbot-include \
|
--plugin-dir=tools/dotbot-include \
|
||||||
--plugin-dir=tools/dotbot-pip \
|
|
||||||
-c "${CONFIG}" \
|
-c "${CONFIG}" \
|
||||||
"${@}"
|
"${@}"
|
||||||
|
|
||||||
@@ -29,10 +26,7 @@ if [ "${DOTBOT_HOST}" != "" ]; then
|
|||||||
echo "(!) Found $DOTBOT_HOST_CONFIG" &&
|
echo "(!) Found $DOTBOT_HOST_CONFIG" &&
|
||||||
"$DOTBOT_BIN_PATH" \
|
"$DOTBOT_BIN_PATH" \
|
||||||
-d "$BASEDIR" \
|
-d "$BASEDIR" \
|
||||||
--plugin-dir=tools/dotbot-asdf \
|
|
||||||
--plugin-dir=tools/dotbot-brew \
|
|
||||||
--plugin-dir=tools/dotbot-include \
|
--plugin-dir=tools/dotbot-include \
|
||||||
--plugin-dir=tools/dotbot-pip \
|
|
||||||
-c "$DOTBOT_HOST_CONFIG" \
|
-c "$DOTBOT_HOST_CONFIG" \
|
||||||
"${@}"
|
"${@}"
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -78,8 +78,3 @@
|
|||||||
- shell:
|
- shell:
|
||||||
# Use my dotfiles manager to install everything
|
# Use my dotfiles manager to install everything
|
||||||
- bash local/bin/dfm install all
|
- bash local/bin/dfm install all
|
||||||
|
|
||||||
- pipx:
|
|
||||||
file: tools/requirements-pipx.txt
|
|
||||||
stdout: true
|
|
||||||
stderr: true
|
|
||||||
|
|||||||
339
local/bin/dfm
339
local/bin/dfm
@@ -15,38 +15,37 @@
|
|||||||
|
|
||||||
SCRIPT=$(basename "$0")
|
SCRIPT=$(basename "$0")
|
||||||
|
|
||||||
# Detect the current shell
|
# Require bash 4.0+ for associative arrays and mapfile
|
||||||
CURRENT_SHELL=$(ps -p $$ -ocomm= | awk -F/ '{print $NF}')
|
if ((BASH_VERSINFO[0] < 4)); then
|
||||||
|
echo "dfm requires bash 4.0+, found ${BASH_VERSION}"
|
||||||
|
if [[ "$(uname)" == "Darwin" ]]; then
|
||||||
|
if ! command -v brew &> /dev/null; then
|
||||||
|
echo "Installing Homebrew..."
|
||||||
|
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||||
|
fi
|
||||||
|
echo "Installing modern bash via Homebrew..."
|
||||||
|
brew install bash
|
||||||
|
echo "Done. Restart your shell and run dfm again."
|
||||||
|
else
|
||||||
|
echo "Install bash 4.0+ and try again."
|
||||||
|
fi
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# Function to source files based on the shell
|
# shellcheck disable=SC1091
|
||||||
source_file()
|
source "$DOTFILES/config/shared.sh"
|
||||||
|
# shellcheck disable=SC1090
|
||||||
|
source "${DOTFILES}/local/bin/msgr"
|
||||||
|
|
||||||
|
# Get description from a script file's @description tag
|
||||||
|
get_script_description()
|
||||||
{
|
{
|
||||||
local file=$1
|
local file="$1"
|
||||||
case "$CURRENT_SHELL" in
|
local desc
|
||||||
fish)
|
desc=$(sed -n '/@description/s/.*@description *\(.*\)/\1/p' "$file" | head -1)
|
||||||
if [[ -f "$file.fish" ]]; then
|
echo "${desc:-No description available}"
|
||||||
# shellcheck disable=SC1090
|
|
||||||
source "$file.fish"
|
|
||||||
else
|
|
||||||
echo "Fish shell file not found: $file.fish"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
sh | bash | zsh)
|
|
||||||
# shellcheck disable=SC1090
|
|
||||||
source "$file"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "Unsupported shell: $CURRENT_SHELL"
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Modify the source commands to use the new function
|
|
||||||
source_file "$DOTFILES/config/shared.sh"
|
|
||||||
source_file "${DOTFILES}/local/bin/msgr"
|
|
||||||
|
|
||||||
# Menu builder
|
# Menu builder
|
||||||
menu_builder()
|
menu_builder()
|
||||||
{
|
{
|
||||||
@@ -54,9 +53,9 @@ menu_builder()
|
|||||||
local commands=("${@:2}")
|
local commands=("${@:2}")
|
||||||
local width=60
|
local width=60
|
||||||
|
|
||||||
printf "\n%s\n" "$(printf '%.s─' $(seq 1 $width))"
|
printf "\n%s\n" "$(printf '%.s─' $(seq 1 "$width"))"
|
||||||
printf "%-${width}s\n" " $title"
|
printf "%-${width}s\n" " $title"
|
||||||
printf "%s\n" "$(printf '%.s─' $(seq 1 $width))"
|
printf "%s\n" "$(printf '%.s─' $(seq 1 "$width"))"
|
||||||
|
|
||||||
for cmd in "${commands[@]}"; do
|
for cmd in "${commands[@]}"; do
|
||||||
local name=${cmd%%:*}
|
local name=${cmd%%:*}
|
||||||
@@ -80,7 +79,6 @@ section_install()
|
|||||||
"imagick:Install ImageMagick CLI"
|
"imagick:Install ImageMagick CLI"
|
||||||
"macos:Setup nice macOS defaults"
|
"macos:Setup nice macOS defaults"
|
||||||
"npm-packages:Install NPM Packages"
|
"npm-packages:Install NPM Packages"
|
||||||
"ntfy:Install ntfy"
|
|
||||||
"nvm-latest:Install latest lts node using nvm"
|
"nvm-latest:Install latest lts node using nvm"
|
||||||
"nvm:Install Node Version Manager (nvm)"
|
"nvm:Install Node Version Manager (nvm)"
|
||||||
"z:Install z"
|
"z:Install z"
|
||||||
@@ -100,6 +98,7 @@ section_install()
|
|||||||
$0 install npm-packages
|
$0 install npm-packages
|
||||||
$0 install z
|
$0 install z
|
||||||
msgr msg "Reloading configurations again..."
|
msgr msg "Reloading configurations again..."
|
||||||
|
# shellcheck disable=SC1091
|
||||||
source "$DOTFILES/config/shared.sh"
|
source "$DOTFILES/config/shared.sh"
|
||||||
msgr yay "All done!"
|
msgr yay "All done!"
|
||||||
;;
|
;;
|
||||||
@@ -208,87 +207,88 @@ section_brew()
|
|||||||
"untracked:List untracked brew packages"
|
"untracked:List untracked brew packages"
|
||||||
)
|
)
|
||||||
|
|
||||||
x-have brew && {
|
if ! x-have brew; then
|
||||||
case "$1" in
|
msgr warn "brew not available, skipping"
|
||||||
install)
|
return 0
|
||||||
brew bundle install --file="$BREWFILE" --force --quiet && msgr yay "Done!"
|
fi
|
||||||
;;
|
|
||||||
|
|
||||||
update)
|
case "$1" in
|
||||||
brew update && brew outdated && brew upgrade && brew cleanup
|
install)
|
||||||
msgr yay "Done!"
|
brew bundle install --file="$BREWFILE" --force --quiet && msgr yay "Done!"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
updatebundle)
|
update)
|
||||||
# Updates .dotfiles/homebrew/Brewfile with descriptions
|
brew update && brew outdated && brew upgrade && brew cleanup
|
||||||
brew bundle dump \
|
msgr yay "Done!"
|
||||||
--force \
|
;;
|
||||||
--file="$BREWFILE" \
|
|
||||||
--cleanup \
|
|
||||||
--tap \
|
|
||||||
--formula \
|
|
||||||
--cask \
|
|
||||||
--describe && msgr yay "Done!"
|
|
||||||
;;
|
|
||||||
|
|
||||||
leaves)
|
updatebundle)
|
||||||
brew leaves --installed-on-request
|
# Updates .dotfiles/homebrew/Brewfile with descriptions
|
||||||
;;
|
brew bundle dump \
|
||||||
|
--force \
|
||||||
|
--file="$BREWFILE" \
|
||||||
|
--cleanup \
|
||||||
|
--tap \
|
||||||
|
--formula \
|
||||||
|
--cask \
|
||||||
|
--describe && msgr yay "Done!"
|
||||||
|
;;
|
||||||
|
|
||||||
untracked)
|
leaves)
|
||||||
declare -a BREW_LIST_ALL
|
brew leaves --installed-on-request
|
||||||
while IFS= read -r line; do
|
;;
|
||||||
BREW_LIST_ALL+=("$line")
|
|
||||||
done < <(brew list --formula --installed-on-request -1 --full-name)
|
|
||||||
while IFS= read -r c; do
|
|
||||||
BREW_LIST_ALL+=("$c")
|
|
||||||
done < <(brew list --cask -1 --full-name)
|
|
||||||
|
|
||||||
# Remove entries that are installed as dependencies
|
untracked)
|
||||||
declare -a BREW_LIST_DEPENDENCIES
|
declare -a BREW_LIST_ALL
|
||||||
while IFS= read -r l; do
|
while IFS= read -r line; do
|
||||||
BREW_LIST_DEPENDENCIES+=("$l")
|
BREW_LIST_ALL+=("$line")
|
||||||
done < <(brew list -1 --installed-as-dependency)
|
done < <(brew list --formula --installed-on-request -1 --full-name)
|
||||||
|
while IFS= read -r c; do
|
||||||
|
BREW_LIST_ALL+=("$c")
|
||||||
|
done < <(brew list --cask -1 --full-name)
|
||||||
|
|
||||||
declare -a BREW_LIST_BUNDLED
|
# Remove entries that are installed as dependencies
|
||||||
while IFS= read -r b; do
|
declare -a BREW_LIST_DEPENDENCIES
|
||||||
BREW_LIST_BUNDLED+=("$b")
|
while IFS= read -r l; do
|
||||||
done < <(brew bundle list --all --file="$BREWFILE")
|
BREW_LIST_DEPENDENCIES+=("$l")
|
||||||
|
done < <(brew list -1 --installed-as-dependency)
|
||||||
|
|
||||||
declare -a BREW_LIST_TRACKED_WITHOUT_DEPS
|
declare -a BREW_LIST_BUNDLED
|
||||||
for f in "${BREW_LIST_ALL[@]}"; do
|
while IFS= read -r b; do
|
||||||
# shellcheck disable=SC2199
|
BREW_LIST_BUNDLED+=("$b")
|
||||||
if [[ " ${BREW_LIST_DEPENDENCIES[@]} " != *" ${f} "* ]]; then
|
done < <(brew bundle list --all --file="$BREWFILE")
|
||||||
BREW_LIST_TRACKED_WITHOUT_DEPS+=("$f")
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
array_diff BREW_LIST_UNTRACKED BREW_LIST_TRACKED_WITHOUT_DEPS BREW_LIST_BUNDLED
|
declare -a BREW_LIST_TRACKED_WITHOUT_DEPS
|
||||||
|
for f in "${BREW_LIST_ALL[@]}"; do
|
||||||
# If there are no untracked packages, exit
|
# shellcheck disable=SC2199
|
||||||
if [ ${#BREW_LIST_UNTRACKED[@]} -eq 0 ]; then
|
if [[ " ${BREW_LIST_DEPENDENCIES[@]} " != *" ${f} "* ]]; then
|
||||||
msgr yay "No untracked packages found!"
|
BREW_LIST_TRACKED_WITHOUT_DEPS+=("$f")
|
||||||
exit 0
|
|
||||||
fi
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
echo "Untracked:"
|
array_diff BREW_LIST_UNTRACKED BREW_LIST_TRACKED_WITHOUT_DEPS BREW_LIST_BUNDLED
|
||||||
for f in "${BREW_LIST_UNTRACKED[@]}"; do
|
|
||||||
echo " $f"
|
|
||||||
done
|
|
||||||
;;
|
|
||||||
|
|
||||||
autoupdate)
|
# If there are no untracked packages, return
|
||||||
brew autoupdate delete
|
if [ ${#BREW_LIST_UNTRACKED[@]} -eq 0 ]; then
|
||||||
brew autoupdate start 43200 --upgrade --cleanup --immediate
|
msgr yay "No untracked packages found!"
|
||||||
;;
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
clean) brew bundle cleanup --file="$BREWFILE" && msgr yay "Done!" ;;
|
echo "Untracked:"
|
||||||
|
for f in "${BREW_LIST_UNTRACKED[@]}"; do
|
||||||
|
echo " $f"
|
||||||
|
done
|
||||||
|
;;
|
||||||
|
|
||||||
*) menu_builder "$USAGE_PREFIX" "${MENU[@]}" ;;
|
autoupdate)
|
||||||
esac
|
brew autoupdate delete
|
||||||
}
|
brew autoupdate start 43200 --upgrade --cleanup --immediate
|
||||||
|
;;
|
||||||
|
|
||||||
! x-have brew && menu_builder "$USAGE_PREFIX" "brew not available on this system"
|
clean) brew bundle cleanup --file="$BREWFILE" && msgr yay "Done!" ;;
|
||||||
|
|
||||||
|
*) menu_builder "$USAGE_PREFIX" "${MENU[@]}" ;;
|
||||||
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
section_helpers()
|
section_helpers()
|
||||||
@@ -299,17 +299,16 @@ section_helpers()
|
|||||||
"colors:Show colors"
|
"colors:Show colors"
|
||||||
"env:Show environment variables"
|
"env:Show environment variables"
|
||||||
"functions:Show functions"
|
"functions:Show functions"
|
||||||
"aerospace:Show aerospace keybindings"
|
|
||||||
"nvim:Show nvim keybindings"
|
"nvim:Show nvim keybindings"
|
||||||
'path:Show $PATH dir by dir'
|
'path:Show $PATH dir by dir'
|
||||||
"tmux:Show tmux keybindings"
|
"tmux:Show tmux keybindings"
|
||||||
"wezterm:Show wezterm keybindings"
|
"wezterm:Show wezterm keybindings"
|
||||||
)
|
)
|
||||||
|
|
||||||
CMD="$1"
|
CMD="${1:-}"
|
||||||
shift
|
[[ $# -gt 0 ]] && shift
|
||||||
SECTION="$1"
|
SECTION="${1:-}"
|
||||||
shift
|
[[ $# -gt 0 ]] && shift
|
||||||
|
|
||||||
case "$CMD" in
|
case "$CMD" in
|
||||||
path)
|
path)
|
||||||
@@ -361,7 +360,6 @@ section_helpers()
|
|||||||
|
|
||||||
"env") env | sort ;;
|
"env") env | sort ;;
|
||||||
"functions") declare -F ;;
|
"functions") declare -F ;;
|
||||||
"aerospace") cat "$DOTFILES/docs/aerospace-keybindings.md" ;;
|
|
||||||
"nvim") cat "$DOTFILES/docs/nvim-keybindings.md" ;;
|
"nvim") cat "$DOTFILES/docs/nvim-keybindings.md" ;;
|
||||||
"tmux") cat "$DOTFILES/docs/tmux-keybindings.md" ;;
|
"tmux") cat "$DOTFILES/docs/tmux-keybindings.md" ;;
|
||||||
"wezterm") cat "$DOTFILES/docs/wezterm-keybindings.md" ;;
|
"wezterm") cat "$DOTFILES/docs/wezterm-keybindings.md" ;;
|
||||||
@@ -381,55 +379,60 @@ section_apt()
|
|||||||
"clean:Clean apt cache"
|
"clean:Clean apt cache"
|
||||||
)
|
)
|
||||||
|
|
||||||
x-have apt && {
|
if ! x-have apt; then
|
||||||
case "$1" in
|
msgr warn "apt not available, skipping"
|
||||||
upkeep)
|
return 0
|
||||||
sudo apt update \
|
fi
|
||||||
&& sudo apt upgrade -y \
|
|
||||||
&& sudo apt autoremove -y \
|
|
||||||
&& sudo apt clean
|
|
||||||
;;
|
|
||||||
|
|
||||||
install)
|
case "$1" in
|
||||||
# if apt.txt is not found, exit
|
upkeep)
|
||||||
[ ! -f "$DOTFILES/tools/apt.txt" ] && msgr err "apt.txt not found" && exit 0
|
sudo apt update \
|
||||||
|
&& sudo apt upgrade -y \
|
||||||
|
&& sudo apt autoremove -y \
|
||||||
|
&& sudo apt clean
|
||||||
|
;;
|
||||||
|
|
||||||
# Load apt.txt, remove comments (even if trailing comment) and empty lines.
|
install)
|
||||||
#
|
# if apt.txt is not found, return with error
|
||||||
# Ignoring "Quote this to prevent word splitting."
|
if [ ! -f "$DOTFILES/tools/apt.txt" ]; then
|
||||||
|
msgr err "apt.txt not found"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Load apt.txt, remove comments (even if trailing comment) and empty lines.
|
||||||
|
#
|
||||||
|
# Ignoring "Quote this to prevent word splitting."
|
||||||
|
# shellcheck disable=SC2046
|
||||||
|
sudo apt install \
|
||||||
|
-y $(
|
||||||
|
grep -vE '^\s*#' "$DOTFILES/tools/apt.txt" \
|
||||||
|
| sed -e 's/#.*//' \
|
||||||
|
| tr '\n' ' '
|
||||||
|
)
|
||||||
|
|
||||||
|
# If there's a apt.txt file under hosts/$hostname/apt.txt,
|
||||||
|
# run install on those lines too.
|
||||||
|
HOSTNAME=$(hostname -s)
|
||||||
|
HOST_APT="$DOTFILES/hosts/$HOSTNAME/apt.txt"
|
||||||
|
[[ -f $HOST_APT ]] && {
|
||||||
# shellcheck disable=SC2046
|
# shellcheck disable=SC2046
|
||||||
sudo apt install \
|
sudo apt install -y $(
|
||||||
-y $(
|
grep -vE '^\s*#' "$HOST_APT" \
|
||||||
grep -vE '^\s*#' "$DOTFILES/tools/apt.txt" \
|
| sed -e 's/#.*//' \
|
||||||
| sed -e 's/#.*//' \
|
| tr '\n' ' '
|
||||||
| tr '\n' ' '
|
)
|
||||||
)
|
}
|
||||||
|
|
||||||
# If there's a apt.txt file under hosts/$hostname/apt.txt,
|
# Try this for an alternative way to install packages
|
||||||
# run install on those lines too.
|
# xargs -a <(awk '! /^ *(#|$)/' "$packagelist") -r -- sudo apt-get install -y
|
||||||
HOSTNAME=$(hostname -s)
|
;;
|
||||||
HOST_APT="$DOTFILES/hosts/$HOSTNAME/apt.txt"
|
|
||||||
[[ -f $HOST_APT ]] && {
|
|
||||||
# shellcheck disable=SC2046
|
|
||||||
sudo apt install -y $(
|
|
||||||
grep -vE '^\s*#' "$HOST_APT" \
|
|
||||||
| sed -e 's/#.*//' \
|
|
||||||
| tr '\n' ' '
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
# Try this for an alternative way to install packages
|
update) sudo apt update ;;
|
||||||
# xargs -a <(awk '! /^ *(#|$)/' "$packagelist") -r -- sudo apt-get install -y
|
upgrade) sudo apt upgrade -y ;;
|
||||||
;;
|
autoremove) sudo apt autoremove -y ;;
|
||||||
|
clean) sudo apt clean ;;
|
||||||
update) sudo apt update ;;
|
*) menu_builder "$USAGE_PREFIX" "${MENU[@]}" ;;
|
||||||
upgrade) sudo apt upgrade -y ;;
|
esac
|
||||||
autoremove) sudo apt autoremove -y ;;
|
|
||||||
clean) sudo apt clean ;;
|
|
||||||
*) menu_builder "$USAGE_PREFIX" "${MENU[@]}" ;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
! x-have apt && menu_builder "$USAGE_PREFIX" "apt not available on this system"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
section_docs()
|
section_docs()
|
||||||
@@ -438,7 +441,6 @@ section_docs()
|
|||||||
|
|
||||||
MENU=(
|
MENU=(
|
||||||
"all:Update all keybindings documentations"
|
"all:Update all keybindings documentations"
|
||||||
"aerospace:Update aerospace keybindings documentation"
|
|
||||||
"tmux:Update tmux keybindings documentation"
|
"tmux:Update tmux keybindings documentation"
|
||||||
"nvim:Update nvim keybindings documentation"
|
"nvim:Update nvim keybindings documentation"
|
||||||
"wezterm:Update wezterm keybindings documentation"
|
"wezterm:Update wezterm keybindings documentation"
|
||||||
@@ -446,12 +448,10 @@ section_docs()
|
|||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
all)
|
all)
|
||||||
$0 docs aerospace
|
|
||||||
$0 docs tmux
|
$0 docs tmux
|
||||||
$0 docs nvim
|
$0 docs nvim
|
||||||
$0 docs wezterm
|
$0 docs wezterm
|
||||||
;;
|
;;
|
||||||
aerospace) bash "$DOTFILES/scripts/create-aerospace-keymaps.php" ;;
|
|
||||||
tmux) bash "$DOTFILES/local/bin/x-dfm-docs-xterm-keybindings" ;;
|
tmux) bash "$DOTFILES/local/bin/x-dfm-docs-xterm-keybindings" ;;
|
||||||
nvim) bash "$DOTFILES/scripts/create-nvim-keymaps.sh" ;;
|
nvim) bash "$DOTFILES/scripts/create-nvim-keymaps.sh" ;;
|
||||||
wezterm) bash "$DOTFILES/scripts/create-wezterm-keymaps.sh" ;;
|
wezterm) bash "$DOTFILES/scripts/create-wezterm-keymaps.sh" ;;
|
||||||
@@ -539,13 +539,13 @@ section_check()
|
|||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
a | arch)
|
a | arch)
|
||||||
[[ $2 == "" ]] && echo "$X_ARCH" && exit 0
|
[[ $2 == "" ]] && echo "$X_ARCH" && return 0
|
||||||
[[ $X_ARCH == "$2" ]] && exit 0 || exit 1
|
[[ $X_ARCH == "$2" ]] && return 0 || return 1
|
||||||
;;
|
;;
|
||||||
|
|
||||||
h | host | hostname)
|
h | host | hostname)
|
||||||
[[ $2 == "" ]] && echo "$X_HOSTNAME" && exit 0
|
[[ $2 == "" ]] && echo "$X_HOSTNAME" && return 0
|
||||||
[[ $X_HOSTNAME == "$2" ]] && exit 0 || exit 1
|
[[ $X_HOSTNAME == "$2" ]] && return 0 || return 1
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*) menu_builder "$USAGE_PREFIX" "${MENU[@]}" ;;
|
*) menu_builder "$USAGE_PREFIX" "${MENU[@]}" ;;
|
||||||
@@ -556,33 +556,18 @@ section_scripts()
|
|||||||
{
|
{
|
||||||
USAGE_PREFIX="$SCRIPT scripts <command>"
|
USAGE_PREFIX="$SCRIPT scripts <command>"
|
||||||
|
|
||||||
# Get description from a file
|
|
||||||
get_script_description()
|
|
||||||
{
|
|
||||||
local file
|
|
||||||
local desc
|
|
||||||
file="$1"
|
|
||||||
desc=$(sed -n '/@description/s/.*@description *\(.*\)/\1/p' "$file" | head -1)
|
|
||||||
echo "${desc:-No description available}"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Collect scripts and their descriptions
|
# Collect scripts and their descriptions
|
||||||
declare -A SCRIPT_MENU
|
local menu_items=()
|
||||||
for script in "$DOTFILES/scripts/install-"*.sh; do
|
for script in "$DOTFILES/scripts/install-"*.sh; do
|
||||||
if [ -f "$script" ]; then
|
if [ -f "$script" ]; then
|
||||||
name=$(basename "$script" .sh | sed 's/install-//')
|
name=$(basename "$script" .sh | sed 's/install-//')
|
||||||
desc=$(get_script_description "$script")
|
desc=$(get_script_description "$script")
|
||||||
SCRIPT_MENU[$name]="$desc"
|
menu_items+=("$name:$desc")
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
"")
|
"")
|
||||||
# Show the menu
|
|
||||||
local menu_items=()
|
|
||||||
for name in "${!SCRIPT_MENU[@]}"; do
|
|
||||||
menu_items+=("$name:${SCRIPT_MENU[$name]}")
|
|
||||||
done
|
|
||||||
menu_builder "$USAGE_PREFIX" "${menu_items[@]}"
|
menu_builder "$USAGE_PREFIX" "${menu_items[@]}"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
@@ -614,7 +599,7 @@ section_tests()
|
|||||||
echo " $i"
|
echo " $i"
|
||||||
done
|
done
|
||||||
;;
|
;;
|
||||||
msg)
|
msgr)
|
||||||
# shellcheck disable=SC1010
|
# shellcheck disable=SC1010
|
||||||
msgr done "msgr done"
|
msgr done "msgr done"
|
||||||
msgr done_suffix "msgr done_suffix"
|
msgr done_suffix "msgr done_suffix"
|
||||||
@@ -638,7 +623,7 @@ usage()
|
|||||||
{
|
{
|
||||||
echo ""
|
echo ""
|
||||||
msgr prompt "Usage: $SCRIPT <section> <command>"
|
msgr prompt "Usage: $SCRIPT <section> <command>"
|
||||||
echo $" Empty <command> prints <section> help."
|
echo " Empty <command> prints <section> help."
|
||||||
echo ""
|
echo ""
|
||||||
section_install
|
section_install
|
||||||
echo ""
|
echo ""
|
||||||
@@ -659,8 +644,8 @@ usage()
|
|||||||
|
|
||||||
main()
|
main()
|
||||||
{
|
{
|
||||||
SECTION="$1"
|
SECTION="${1:-}"
|
||||||
shift
|
[[ $# -gt 0 ]] && shift
|
||||||
# The main loop. The first keyword after $0 triggers section, or help.
|
# The main loop. The first keyword after $0 triggers section, or help.
|
||||||
case "$SECTION" in
|
case "$SECTION" in
|
||||||
install) section_install "$@" ;;
|
install) section_install "$@" ;;
|
||||||
@@ -672,7 +657,7 @@ main()
|
|||||||
docs) section_docs "$@" ;;
|
docs) section_docs "$@" ;;
|
||||||
scripts) section_scripts "$@" ;;
|
scripts) section_scripts "$@" ;;
|
||||||
tests) section_tests "$@" ;;
|
tests) section_tests "$@" ;;
|
||||||
*) usage && exit 0 ;;
|
*) usage && return 0 ;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ set -euo pipefail
|
|||||||
# Enable verbosity with VERBOSE=1
|
# Enable verbosity with VERBOSE=1
|
||||||
VERBOSE="${VERBOSE:-0}"
|
VERBOSE="${VERBOSE:-0}"
|
||||||
|
|
||||||
A_DIR="$HOME/.config/alacritty"
|
A_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/alacritty"
|
||||||
|
|
||||||
# Function to print usage information
|
# Function to print usage information
|
||||||
usage()
|
usage()
|
||||||
|
|||||||
@@ -7,13 +7,15 @@
|
|||||||
# Author: Ismo Vuorinen 2025
|
# Author: Ismo Vuorinen 2025
|
||||||
# License: MIT
|
# License: MIT
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
# Check if the user has provided a directory as an argument
|
# Check if the user has provided a directory as an argument
|
||||||
if [ "$1" ]; then
|
if [ "${1:-}" ]; then
|
||||||
# Check if the directory exists
|
# Check if the directory exists
|
||||||
if [ -d "$1" ]; then
|
if [ -d "$1" ]; then
|
||||||
CLEANDIR="$1"
|
CLEANDIR="$1"
|
||||||
else
|
else
|
||||||
msgr err "Directory $1 does not exist."
|
echo "Error: Directory $1 does not exist." >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
@@ -27,7 +29,7 @@ remove_node_modules_vendor()
|
|||||||
|
|
||||||
# If the directory is a symlink, skip it
|
# If the directory is a symlink, skip it
|
||||||
if [ -L "$dir" ]; then
|
if [ -L "$dir" ]; then
|
||||||
msgr msg "Skipping symlink $dir"
|
echo "Skipping symlink $dir"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -35,18 +37,18 @@ remove_node_modules_vendor()
|
|||||||
if [ -d "$dir" ]; then
|
if [ -d "$dir" ]; then
|
||||||
# If node_modules or vendor folder exists, remove it and all its contents
|
# If node_modules or vendor folder exists, remove it and all its contents
|
||||||
if [ -d "$dir/node_modules" ]; then
|
if [ -d "$dir/node_modules" ]; then
|
||||||
msgr run "Removing $dir/node_modules"
|
echo "Removing $dir/node_modules"
|
||||||
rm -rf "$dir/node_modules"
|
rm -rf "$dir/node_modules"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -d "$dir/vendor" ]; then
|
if [ -d "$dir/vendor" ]; then
|
||||||
msgr run "Removing $dir/vendor"
|
echo "Removing $dir/vendor"
|
||||||
rm -rf "$dir/vendor"
|
rm -rf "$dir/vendor"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Recursively check subdirectories
|
# Recursively check subdirectories
|
||||||
for item in "$dir"/*; do
|
for item in "$dir"/*; do
|
||||||
remove_node_modules_vendor "$item"
|
[ -d "$item" ] && remove_node_modules_vendor "$item"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
#
|
#
|
||||||
# List environment variables grouped by the first part before underscore
|
# List environment variables grouped by the first part before underscore
|
||||||
# protecting environment variables that possibly contain sensitive information.
|
# protecting environment variables that possibly contain sensitive information.
|
||||||
|
|||||||
@@ -1,18 +1,26 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
#
|
#
|
||||||
# foreach <folder> <commands that should be run to each file>
|
# Run a command in each directory matching a pattern.
|
||||||
# foreach "ls -d */" "git status" # run git status in each folder
|
#
|
||||||
|
# Usage: x-foreach <listing-command> <command> [args...]
|
||||||
|
# x-foreach "ls -d */" "git status"
|
||||||
#
|
#
|
||||||
# Source: https://github.com/mvdan/dotfiles/blob/master/.bin/foreach
|
# Source: https://github.com/mvdan/dotfiles/blob/master/.bin/foreach
|
||||||
|
|
||||||
cmd=$1
|
set -euo pipefail
|
||||||
|
|
||||||
|
if [ $# -lt 2 ]; then
|
||||||
|
echo "Usage: $0 <listing-command> <command> [args...]"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
listing=$1
|
||||||
shift
|
shift
|
||||||
|
|
||||||
for dir in $($cmd); do
|
for dir in $(eval "$listing"); do
|
||||||
(
|
(
|
||||||
echo "$dir"
|
echo "$dir"
|
||||||
cd "$dir" || exit 1
|
cd "$dir" || exit 1
|
||||||
# shellcheck disable=SC2294,SC2034
|
"$@"
|
||||||
eval "$@" # allow multiple commands like "foo && bar"
|
|
||||||
)
|
)
|
||||||
done
|
done
|
||||||
|
|||||||
@@ -1,4 +1,14 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
#
|
||||||
|
# Display external IP address.
|
||||||
|
#
|
||||||
# Source: https://github.com/thirtythreeforty/dotfiles/blob/master/bin/extip
|
# Source: https://github.com/thirtythreeforty/dotfiles/blob/master/bin/extip
|
||||||
|
|
||||||
curl icanhazip.com "${@}"
|
set -euo pipefail
|
||||||
|
|
||||||
|
if ! command -v curl &> /dev/null; then
|
||||||
|
echo "Error: curl is required" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
curl -sf icanhazip.com
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
#
|
#
|
||||||
# x-localip: script to display the local IP addresses of the system
|
# x-localip: script to display the local IP addresses of the system
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -1,50 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
#
|
|
||||||
# Create a directory and cd into it
|
|
||||||
# Usage: x-mkd <dir>
|
|
||||||
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
# Set verbosity with VERBOSE=1
|
|
||||||
VERBOSE="${VERBOSE:-0}"
|
|
||||||
|
|
||||||
# Function to print usage information
|
|
||||||
usage()
|
|
||||||
{
|
|
||||||
echo "Usage: $0 <dir>"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
# Function to print messages if VERBOSE is enabled
|
|
||||||
# $1 - message (string)
|
|
||||||
msg()
|
|
||||||
{
|
|
||||||
[[ "$VERBOSE" -eq 1 ]] && echo "$1"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Function to create a directory and cd into it
|
|
||||||
# $1 - directory to create and cd into (string)
|
|
||||||
mkcd()
|
|
||||||
{
|
|
||||||
local dir=$1
|
|
||||||
|
|
||||||
mkdir -p "$dir" && msg "Directory $dir created"
|
|
||||||
|
|
||||||
cd "$dir" || {
|
|
||||||
msg "Failed to cd into $dir"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
msg "Changed directory to $dir"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Main function
|
|
||||||
main()
|
|
||||||
{
|
|
||||||
if [ "$#" -ne 1 ]; then
|
|
||||||
usage
|
|
||||||
fi
|
|
||||||
|
|
||||||
mkcd "$1"
|
|
||||||
}
|
|
||||||
|
|
||||||
main "$@"
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
# x-mkd
|
|
||||||
|
|
||||||
Create a directory and immediately `cd` into it.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
x-mkd <dir>
|
|
||||||
```
|
|
||||||
|
|
||||||
Set `VERBOSE=1` for status messages.
|
|
||||||
|
|
||||||
## Example
|
|
||||||
|
|
||||||
```bash
|
|
||||||
x-mkd project && git init
|
|
||||||
```
|
|
||||||
|
|
||||||
<!-- vim: set ft=markdown spell spelllang=en_us cc=80 : -->
|
|
||||||
@@ -39,7 +39,6 @@
|
|||||||
# Defaults
|
# Defaults
|
||||||
LOOP=0
|
LOOP=0
|
||||||
SLEEP=1
|
SLEEP=1
|
||||||
VERBOSE=0
|
|
||||||
TIMEOUT=5
|
TIMEOUT=5
|
||||||
|
|
||||||
usage()
|
usage()
|
||||||
@@ -60,8 +59,6 @@ while [[ $# -gt 0 ]]; do
|
|||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
--verbose)
|
--verbose)
|
||||||
# shellcheck disable=SC2034
|
|
||||||
VERBOSE=1
|
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
--loop | --forever)
|
--loop | --forever)
|
||||||
|
|||||||
@@ -227,6 +227,9 @@ do_check()
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# If sourced, provide functions without executing main logic
|
||||||
|
(return 0 2> /dev/null) && return
|
||||||
|
|
||||||
#######################################
|
#######################################
|
||||||
# Main routine: Parse subcommand and arguments, normalize PATH,
|
# Main routine: Parse subcommand and arguments, normalize PATH,
|
||||||
# and dispatch to the appropriate functionality.
|
# and dispatch to the appropriate functionality.
|
||||||
|
|||||||
@@ -1,44 +1,17 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
#
|
#
|
||||||
# Optimized script to append directories to PATH.
|
# Thin wrapper — delegates to x-path append.
|
||||||
# For each given directory, it removes all duplicate occurrences from PATH
|
# Can be sourced (PATH changes propagate) or executed.
|
||||||
# and then appends it if the directory exists.
|
|
||||||
#
|
#
|
||||||
# Usage: x-path-append <directory1> [<directory2> ...]
|
# Usage: x-path-append <directory1> [<directory2> ...]
|
||||||
#
|
#
|
||||||
# Enable verbose output by setting the environment variable VERBOSE=1.
|
|
||||||
#
|
|
||||||
# Author: Ismo Vuorinen <https://github.com/ivuorinen> 2024
|
# Author: Ismo Vuorinen <https://github.com/ivuorinen> 2024
|
||||||
# License: MIT
|
# License: MIT
|
||||||
|
|
||||||
VERBOSE="${VERBOSE:-0}"
|
VERBOSE="${VERBOSE:-0}"
|
||||||
|
|
||||||
# Ensure that at least one directory is provided.
|
# shellcheck source=./x-path
|
||||||
[ "$#" -lt 1 ] && {
|
. "$(dirname "${BASH_SOURCE[0]:-$0}")/x-path"
|
||||||
echo "Usage: $0 <directory> [<directory> ...]"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
for dir in "$@"; do
|
normalize_path_var
|
||||||
# Check if the specified directory exists.
|
do_append "$@"
|
||||||
if [ ! -d "$dir" ]; then
|
|
||||||
[ "$VERBOSE" -eq 1 ] && echo "(?) Directory '$dir' does not exist. Skipping."
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Remove all duplicate occurrences of the directory from PATH.
|
|
||||||
case ":$PATH:" in
|
|
||||||
*":$dir:"*)
|
|
||||||
PATH=":${PATH}:"
|
|
||||||
PATH="${PATH//:$dir:/:}"
|
|
||||||
PATH="${PATH#:}"
|
|
||||||
PATH="${PATH%:}"
|
|
||||||
[ "$VERBOSE" -eq 1 ] && echo "Removed previous occurrences of '$dir' from PATH."
|
|
||||||
;;
|
|
||||||
*) ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# Append the directory to PATH.
|
|
||||||
export PATH="${PATH:+$PATH:}$dir"
|
|
||||||
[ "$VERBOSE" -eq 1 ] && echo "Appended '$dir' to PATH."
|
|
||||||
done
|
|
||||||
|
|||||||
@@ -1,50 +1,17 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
#
|
#
|
||||||
# Optimized script to batch prepend directories to PATH.
|
# Thin wrapper — delegates to x-path prepend.
|
||||||
# For each given directory, it removes all duplicate occurrences from PATH
|
# Can be sourced (PATH changes propagate) or executed.
|
||||||
# and then prepends it. Directories that do not exist are skipped.
|
|
||||||
#
|
#
|
||||||
# Usage: x-path-prepend <directory1> [<directory2> ...]
|
# Usage: x-path-prepend <directory1> [<directory2> ...]
|
||||||
#
|
#
|
||||||
# Enable verbose output by setting the environment variable VERBOSE=1.
|
|
||||||
#
|
|
||||||
# Author: Ismo Vuorinen <https://github.com/ivuorinen> 2024
|
# Author: Ismo Vuorinen <https://github.com/ivuorinen> 2024
|
||||||
# License: MIT
|
# License: MIT
|
||||||
|
|
||||||
VERBOSE="${VERBOSE:-0}"
|
VERBOSE="${VERBOSE:-0}"
|
||||||
|
|
||||||
# Ensure that at least one argument is provided.
|
# shellcheck source=./x-path
|
||||||
[ "$#" -lt 1 ] && {
|
. "$(dirname "${BASH_SOURCE[0]:-$0}")/x-path"
|
||||||
echo "Usage: $0 <directory> [<directory> ...]"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
# Save the arguments in an array.
|
normalize_path_var
|
||||||
dirs=("$@")
|
do_prepend "$@"
|
||||||
|
|
||||||
# Process the directories in reverse order so that the first argument ends up leftmost in PATH.
|
|
||||||
for ((idx = ${#dirs[@]} - 1; idx >= 0; idx--)); do
|
|
||||||
dir="${dirs[idx]}"
|
|
||||||
|
|
||||||
# Check if the specified directory exists.
|
|
||||||
if [ ! -d "$dir" ]; then
|
|
||||||
[ "$VERBOSE" -eq 1 ] && echo "(?) Directory '$dir' does not exist. Skipping."
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Remove all duplicate occurrences of the directory from PATH using built-in string operations.
|
|
||||||
case ":$PATH:" in
|
|
||||||
*":$dir:"*)
|
|
||||||
PATH=":${PATH}:"
|
|
||||||
PATH="${PATH//:$dir:/:}"
|
|
||||||
PATH="${PATH#:}"
|
|
||||||
PATH="${PATH%:}"
|
|
||||||
[ "$VERBOSE" -eq 1 ] && echo "Removed duplicate occurrences of '$dir' from PATH."
|
|
||||||
;;
|
|
||||||
*) ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# Prepend the directory to PATH.
|
|
||||||
export PATH="$dir${PATH:+":$PATH"}"
|
|
||||||
[ "$VERBOSE" -eq 1 ] && echo "Prepended '$dir' to PATH."
|
|
||||||
done
|
|
||||||
|
|||||||
@@ -1,41 +1,17 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
#
|
#
|
||||||
# Optimized script to remove directories from PATH.
|
# Thin wrapper — delegates to x-path remove.
|
||||||
# For each specified directory, all occurrences are removed from PATH.
|
# Can be sourced (PATH changes propagate) or executed.
|
||||||
#
|
#
|
||||||
# Usage: x-path-remove <directory1> [<directory2> ...]
|
# Usage: x-path-remove <directory1> [<directory2> ...]
|
||||||
#
|
#
|
||||||
# Enable verbose output by setting the environment variable VERBOSE=1.
|
|
||||||
#
|
|
||||||
# Author: Ismo Vuorinen <https://github.com/ivuorinen> 2024
|
# Author: Ismo Vuorinen <https://github.com/ivuorinen> 2024
|
||||||
# License: MIT
|
# License: MIT
|
||||||
|
|
||||||
VERBOSE="${VERBOSE:-0}"
|
VERBOSE="${VERBOSE:-0}"
|
||||||
|
|
||||||
# Ensure that at least one directory is provided.
|
# shellcheck source=./x-path
|
||||||
[ "$#" -lt 1 ] && {
|
. "$(dirname "${BASH_SOURCE[0]:-$0}")/x-path"
|
||||||
echo "Usage: $0 <directory> [<directory> ...]"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
for dir in "$@"; do
|
normalize_path_var
|
||||||
# Remove trailing slash if present, unless the directory is "/"
|
do_remove "$@"
|
||||||
[ "$dir" != "/" ] && dir="${dir%/}"
|
|
||||||
|
|
||||||
# Check if the directory is present in PATH.
|
|
||||||
case ":$PATH:" in
|
|
||||||
*":$dir:"*)
|
|
||||||
# Remove all occurrences of the directory from PATH using parameter expansion.
|
|
||||||
PATH=":${PATH}:"
|
|
||||||
PATH="${PATH//:$dir:/:}"
|
|
||||||
PATH="${PATH#:}"
|
|
||||||
PATH="${PATH%:}"
|
|
||||||
[ "$VERBOSE" -eq 1 ] && echo "Removed '$dir' from PATH."
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
[ "$VERBOSE" -eq 1 ] && echo "(?) '$dir' is not in PATH."
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
export PATH
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ msg()
|
|||||||
# Notify function
|
# Notify function
|
||||||
notify()
|
notify()
|
||||||
{
|
{
|
||||||
notify-call --replace-file "$replace_id" "$@"
|
notify-send.sh --replace-file "$replace_id" "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Stop recording function
|
# Stop recording function
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ The script automatically tries authentication methods in this order:
|
|||||||
|
|
||||||
1. **Specific key** (if provided in host file)
|
1. **Specific key** (if provided in host file)
|
||||||
2. **Auto-detected default keys** (`~/.ssh/id_ed25519`, `id_rsa`, `id_ecdsa`,
|
2. **Auto-detected default keys** (`~/.ssh/id_ed25519`, `id_rsa`, `id_ecdsa`,
|
||||||
`id_dsa`)
|
`id_dsa`)
|
||||||
3. **SSH agent or system default authentication**
|
3. **SSH agent or system default authentication**
|
||||||
|
|
||||||
This means you can mix hosts with and without specific keys, and the script will
|
This means you can mix hosts with and without specific keys, and the script will
|
||||||
@@ -178,7 +178,7 @@ SSH_RETRIES=3
|
|||||||
3. **Staged Rollout**: Test on non-critical hosts first
|
3. **Staged Rollout**: Test on non-critical hosts first
|
||||||
4. **Review Logs**: Check log files for detailed information
|
4. **Review Logs**: Check log files for detailed information
|
||||||
5. **Preserve Access**: Script ensures key-based auth works before disabling
|
5. **Preserve Access**: Script ensures key-based auth works before disabling
|
||||||
passwords
|
passwords
|
||||||
|
|
||||||
## Version
|
## Version
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,13 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
#
|
#
|
||||||
# This file echoes a bunch of 24-bit color codes
|
# Display 24-bit terminal color test.
|
||||||
# to the terminal to demonstrate its functionality.
|
#
|
||||||
# The foreground escape sequence is ^[38;2;<r>;<g>;<b>m
|
# Usage: x-term-colors
|
||||||
# The background escape sequence is ^[48;2;<r>;<g>;<b>m
|
#
|
||||||
# <r> <g> <b> range from 0 to 255 inclusive.
|
# The foreground escape sequence is ^[38;2;<r>;<g>;<b>m
|
||||||
# The escape sequence ^[0m returns output to default
|
# The background escape sequence is ^[48;2;<r>;<g>;<b>m
|
||||||
|
# <r> <g> <b> range from 0 to 255 inclusive.
|
||||||
|
# The escape sequence ^[0m returns output to default
|
||||||
|
|
||||||
setBackgroundColor()
|
setBackgroundColor()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,68 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
#
|
|
||||||
# This script contains a helper for sha256 validating your downloads
|
|
||||||
#
|
|
||||||
# Source: https://gist.github.com/onnimonni/b49779ebc96216771a6be3de46449fa1
|
|
||||||
# Author: Onni Hakala
|
|
||||||
# License: MIT
|
|
||||||
#
|
|
||||||
# Updated by Ismo Vuorinen <https://github.com/ivuorinen> 2022
|
|
||||||
##
|
|
||||||
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
# Stop program and give error message
|
|
||||||
# $1 - error message (string)
|
|
||||||
error()
|
|
||||||
{
|
|
||||||
echo "(!) ERROR: $1" >&2
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
# Check for sha256sum command
|
|
||||||
if ! command -v sha256sum &> /dev/null; then
|
|
||||||
error "sha256sum could not be found, please install it first"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Return sha256sum for file
|
|
||||||
# $1 - filename (string)
|
|
||||||
get_sha256sum()
|
|
||||||
{
|
|
||||||
sha256sum "$1" | head -c 64
|
|
||||||
}
|
|
||||||
|
|
||||||
# Validate input arguments
|
|
||||||
validate_inputs()
|
|
||||||
{
|
|
||||||
if [ -z "${filename:-}" ]; then
|
|
||||||
error "You need to provide filename as the first parameter"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "${file_hash:-}" ]; then
|
|
||||||
error "You need to provide sha256sum as the second parameter"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Main validation logic
|
|
||||||
validate_file()
|
|
||||||
{
|
|
||||||
if [ ! -f "$filename" ]; then
|
|
||||||
error "File $filename doesn't exist"
|
|
||||||
elif [ "$(get_sha256sum "$filename")" = "$file_hash" ]; then
|
|
||||||
echo "(*) Success: $filename matches provided sha256sum"
|
|
||||||
else
|
|
||||||
error "$filename doesn't match provided sha256sum"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Main function
|
|
||||||
main()
|
|
||||||
{
|
|
||||||
filename=$1
|
|
||||||
file_hash=$2
|
|
||||||
|
|
||||||
validate_inputs
|
|
||||||
validate_file
|
|
||||||
}
|
|
||||||
|
|
||||||
main "$@"
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
# x-validate-sha256sum.sh
|
|
||||||
|
|
||||||
This script contains a helper for sha256 validating your downloads
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
x-validate-sha256sum.sh file sha256sum
|
|
||||||
```
|
|
||||||
|
|
||||||
The script computes the SHA256 hash of `file` and compares it to the
|
|
||||||
expected value. It exits non-zero if the sums differ.
|
|
||||||
|
|
||||||
<!-- vim: set ft=markdown spell spelllang=en_us cc=80 : -->
|
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
#
|
#
|
||||||
# Wait until a given host is down (determined by ping) then execute the
|
# Wait until a given host is down (determined by ping) then execute the
|
||||||
# given command
|
# given command
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
#
|
#
|
||||||
# Wait until a given host is online (determined by ping) then execute the
|
# Wait until a given host is online (determined by ping) then execute the
|
||||||
# given command
|
# given command
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
# create-aerospace-keymaps
|
|
||||||
|
|
||||||
Generates `docs/aerospace-keybindings.md` using `aerospace config --json`.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
scripts/create-aerospace-keymaps.php
|
|
||||||
```
|
|
||||||
|
|
||||||
Requires the `aerospace` CLI tool to be installed.
|
|
||||||
@@ -1,67 +0,0 @@
|
|||||||
#!/usr/bin/env php
|
|
||||||
<?php
|
|
||||||
// @description Create file containing key mappings for aerospace
|
|
||||||
// Usage: ./create-aerospace-keymaps.sh
|
|
||||||
// vim: ft=php ts=4 sw=4 sts=4 sr et
|
|
||||||
|
|
||||||
$dotfiles_env = getenv("DOTFILES") ?? '~/.dotfiles';
|
|
||||||
|
|
||||||
$dest = "$dotfiles_env/docs/aerospace-keybindings.md";
|
|
||||||
|
|
||||||
exec("aerospace config --get mode --json", $output);
|
|
||||||
$output = implode(' ', $output);
|
|
||||||
$config = json_decode($output, true);
|
|
||||||
|
|
||||||
$main = $config['main'];
|
|
||||||
unset($config['main']);
|
|
||||||
|
|
||||||
function process_section(string $title, array $array): string
|
|
||||||
{
|
|
||||||
$bindings = $array['binding'] ?? [];
|
|
||||||
ksort($bindings);
|
|
||||||
|
|
||||||
$output = [];
|
|
||||||
$output[] = sprintf("\n## %s\n", $title);
|
|
||||||
|
|
||||||
$k_len = max(array_map('strlen', array_keys($bindings)));
|
|
||||||
$v_len = max(array_map('strlen', array_values($bindings)));
|
|
||||||
|
|
||||||
$output[] = sprintf(
|
|
||||||
"| %s | %s |",
|
|
||||||
str_pad('Key', $k_len + 1),
|
|
||||||
str_pad('Command(s) and actions', $v_len + 1)
|
|
||||||
);
|
|
||||||
$output[] = sprintf(
|
|
||||||
"|%s|%s|",
|
|
||||||
str_repeat('-', $k_len + 3),
|
|
||||||
str_repeat('-', $v_len + 3)
|
|
||||||
);
|
|
||||||
|
|
||||||
foreach ($bindings as $key => $value) {
|
|
||||||
$k = str_pad($key, $k_len + 1);
|
|
||||||
$v = str_pad($value, $v_len + 1);
|
|
||||||
$output[] = sprintf("| %s | %s |", $k, $v);
|
|
||||||
}
|
|
||||||
|
|
||||||
return implode("\n", $output);
|
|
||||||
}
|
|
||||||
|
|
||||||
$contents = [];
|
|
||||||
$contents[] = "# aerospace keybindings";
|
|
||||||
|
|
||||||
$contents[] = process_section("main", $main);
|
|
||||||
|
|
||||||
ksort($config);
|
|
||||||
|
|
||||||
foreach ($config as $mode => $bindings) {
|
|
||||||
$contents[] = process_section($mode, $bindings);
|
|
||||||
}
|
|
||||||
|
|
||||||
$contents[] = "\nFile generated: " . date("Y-m-d H:i:s") . "\n";
|
|
||||||
|
|
||||||
$config_file_name = 'config/aerospace/aerospace.toml';
|
|
||||||
$config_file_source = './../config/aerospace/aerospace.toml';
|
|
||||||
$contents[] = "Config file: [$config_file_name]($config_file_source)\n";
|
|
||||||
|
|
||||||
$file = implode("\n", $contents);
|
|
||||||
file_put_contents($dest, $file);
|
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
# @description Create file containing key mappings for Neovim
|
# @description Create file containing key mappings for Neovim
|
||||||
# Usage: ./create-nvim-keymaps.sh
|
# Usage: ./create-nvim-keymaps.sh
|
||||||
#
|
#
|
||||||
@@ -15,7 +16,7 @@ main()
|
|||||||
printf "\`\`\`txt"
|
printf "\`\`\`txt"
|
||||||
} > "$DEST"
|
} > "$DEST"
|
||||||
|
|
||||||
nvim -c "redir! >> $DEST" -c 'silent verbose map' -c 'redir END' -c 'q'
|
nvim -c "redir! >> \"$DEST\"" -c 'silent verbose map' -c 'redir END' -c 'q'
|
||||||
|
|
||||||
printf "\n\`\`\`\n\n- Generated on %s\n" "$(date)" >> "$DEST"
|
printf "\n\`\`\`\n\n- Generated on %s\n" "$(date)" >> "$DEST"
|
||||||
|
|
||||||
|
|||||||
@@ -11,10 +11,10 @@ scripts/install-cargo-packages.sh
|
|||||||
## What it does
|
## What it does
|
||||||
|
|
||||||
1. If `cargo-install-update` is available, updates all existing packages first
|
1. If `cargo-install-update` is available, updates all existing packages first
|
||||||
and tracks which packages are already installed.
|
and tracks which packages are already installed.
|
||||||
2. Installs each package from the inline list using `cargo install`,
|
2. Installs each package from the inline list using `cargo install`,
|
||||||
skipping any already handled by the update step.
|
skipping any already handled by the update step.
|
||||||
Builds run in parallel using available CPU cores (minus two).
|
Builds run in parallel using available CPU cores (minus two).
|
||||||
3. Runs package-specific post-install steps.
|
3. Runs package-specific post-install steps.
|
||||||
4. Cleans the cargo cache with `cargo cache --autoclean`.
|
4. Cleans the cargo cache with `cargo cache --autoclean`.
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
# @description Install cargo/rust packages.
|
# @description Install cargo/rust packages.
|
||||||
|
#
|
||||||
|
# shellcheck source=shared.sh
|
||||||
|
source "$DOTFILES/config/shared.sh"
|
||||||
|
|
||||||
msgr run "Starting to install rust/cargo packages"
|
msgr run "Starting to install rust/cargo packages"
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
# @description Update pure-bash-bible cheatsheets
|
# @description Update pure-bash-bible cheatsheets
|
||||||
# shellcheck disable=SC2231,SC2034,SC2181,SC2068
|
# shellcheck disable=SC2231,SC2034,SC2181,SC2068
|
||||||
# shellcheck source=shared.sh
|
# shellcheck source=shared.sh
|
||||||
@@ -85,7 +86,7 @@ process_chapters()
|
|||||||
if [ '---' != "$(head -1 < "$cheat_file")" ]; then
|
if [ '---' != "$(head -1 < "$cheat_file")" ]; then
|
||||||
local metadata
|
local metadata
|
||||||
metadata="$PBB_SYNTAX\n$PBB_TAGS\n$PBB_SOURCE\n"
|
metadata="$PBB_SYNTAX\n$PBB_TAGS\n$PBB_SOURCE\n"
|
||||||
echo -e "---\n$metadata---\n$(cat "$cheat_file")" > "$cheat_file"
|
printf '%s\n%b%s\n%s' "---" "$metadata" "---" "$(cat "$cheat_file")" > "$cheat_file"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
# @description Install PHP Package Manager Composer
|
# @description Install PHP Package Manager Composer
|
||||||
#
|
#
|
||||||
# shellcheck source="shared.sh"
|
# shellcheck source="shared.sh"
|
||||||
source "$HOME/.dotfiles/config/shared.sh"
|
source "$DOTFILES/config/shared.sh"
|
||||||
|
|
||||||
if ! command -v php &> /dev/null; then
|
if ! command -v php &> /dev/null; then
|
||||||
msg_err "PHP Not Available, cannot install composer"
|
msg_err "PHP Not Available, cannot install composer"
|
||||||
@@ -22,5 +23,7 @@ fi
|
|||||||
php composer-setup.php --quiet
|
php composer-setup.php --quiet
|
||||||
RESULT=$?
|
RESULT=$?
|
||||||
rm composer-setup.php
|
rm composer-setup.php
|
||||||
mv composer.phar ~/.local/bin/composer
|
if [ $RESULT -eq 0 ]; then
|
||||||
|
mv composer.phar ~/.local/bin/composer
|
||||||
|
fi
|
||||||
exit $RESULT
|
exit $RESULT
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
# @description Install NerdFonts
|
# @description Install NerdFonts
|
||||||
#
|
#
|
||||||
# shellcheck source="shared.sh"
|
# shellcheck source="shared.sh"
|
||||||
@@ -21,7 +22,7 @@ clone_or_update_repo()
|
|||||||
git clone --quiet --filter=blob:none --sparse --depth=1 "$GIT_REPO" "$TMP_PATH"
|
git clone --quiet --filter=blob:none --sparse --depth=1 "$GIT_REPO" "$TMP_PATH"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd "$TMP_PATH" || msgr err "No such folder $TMP_PATH"
|
cd "$TMP_PATH" || { msgr err "No such folder $TMP_PATH"; exit 1; }
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to add fonts to sparse-checkout
|
# Function to add fonts to sparse-checkout
|
||||||
|
|||||||
@@ -1,12 +1,10 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
# @description Install GitHub CLI extensions
|
# @description Install GitHub CLI extensions
|
||||||
#
|
#
|
||||||
# shellcheck source="shared.sh"
|
# shellcheck source="shared.sh"
|
||||||
source "${DOTFILES}/config/shared.sh"
|
source "${DOTFILES}/config/shared.sh"
|
||||||
|
|
||||||
# Enable verbosity with VERBOSE=1
|
|
||||||
VERBOSE="${VERBOSE:-0}"
|
|
||||||
|
|
||||||
msgr run "Installing gh (GitHub Client) extensions"
|
msgr run "Installing gh (GitHub Client) extensions"
|
||||||
|
|
||||||
if ! command -v gh &> /dev/null; then
|
if ! command -v gh &> /dev/null; then
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
# @description Install git-crypt
|
# @description Install git-crypt
|
||||||
#
|
#
|
||||||
# NOTE: Experimental, wip
|
# NOTE: Experimental, wip
|
||||||
@@ -6,21 +7,17 @@
|
|||||||
# shellcheck source=shared.sh
|
# shellcheck source=shared.sh
|
||||||
source "${DOTFILES}/config/shared.sh"
|
source "${DOTFILES}/config/shared.sh"
|
||||||
|
|
||||||
# Enable verbosity with VERBOSE=1
|
|
||||||
VERBOSE="${VERBOSE:-0}"
|
|
||||||
|
|
||||||
msgr run "Installing git-crypt"
|
msgr run "Installing git-crypt"
|
||||||
|
|
||||||
if ! command -v git-crypt &> /dev/null; then
|
if ! command -v git-crypt &> /dev/null; then
|
||||||
REPO_URL="https://github.com/AGWA/git-crypt.git"
|
REPO_URL="https://github.com/AGWA/git-crypt.git"
|
||||||
CHECK_PATH="${XDG_BIN_HOME}/git-crypt"
|
CHECK_PATH="${XDG_BIN_HOME}/git-crypt"
|
||||||
BUILD_PATH="/tmp/git-crypt"
|
BUILD_PATH="$(mktemp -d)"
|
||||||
|
trap 'rm -rf "$BUILD_PATH"' EXIT
|
||||||
|
|
||||||
rm -rf "$BUILD_PATH"
|
if [ ! -f "$CHECK_PATH" ]; then
|
||||||
|
git clone --depth 1 "$REPO_URL" "$BUILD_PATH" || { msgr err "Failed to clone $REPO_URL"; exit 1; }
|
||||||
if [ ! -d "$CHECK_PATH" ]; then
|
cd "$BUILD_PATH" || { msgr err "$BUILD_PATH not found"; exit 1; }
|
||||||
git clone --depth 1 "$REPO_URL" "$BUILD_PATH" || true
|
|
||||||
cd "$BUILD_PATH" || msg_err "$BUILD_PATH not found"
|
|
||||||
make && make install PREFIX="$HOME/.local"
|
make && make install PREFIX="$HOME/.local"
|
||||||
else
|
else
|
||||||
msgr run_done "git-crypt ($CHECK_PATH) already installed"
|
msgr run_done "git-crypt ($CHECK_PATH) already installed"
|
||||||
|
|||||||
@@ -1,12 +1,10 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
# @description Install Go packages
|
# @description Install Go packages
|
||||||
#
|
#
|
||||||
# shellcheck source=shared.sh
|
# shellcheck source=shared.sh
|
||||||
source "$DOTFILES/config/shared.sh"
|
source "$DOTFILES/config/shared.sh"
|
||||||
|
|
||||||
# Enable verbosity with VERBOSE=1
|
|
||||||
VERBOSE="${VERBOSE:-0}"
|
|
||||||
|
|
||||||
msgr run "Installing go packages"
|
msgr run "Installing go packages"
|
||||||
|
|
||||||
! x-have "go" && msgr err "go hasn't been installed yet." && exit 0
|
! x-have "go" && msgr err "go hasn't been installed yet." && exit 0
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
set -uo pipefail
|
||||||
# @description Sets macOS Defaults that I like
|
# @description Sets macOS Defaults that I like
|
||||||
#
|
#
|
||||||
# This script contains large portions from following scripts:
|
# This script contains large portions from following scripts:
|
||||||
@@ -7,7 +8,7 @@
|
|||||||
[ "$(uname)" != "Darwin" ] && echo "Not a macOS system" && exit 0
|
[ "$(uname)" != "Darwin" ] && echo "Not a macOS system" && exit 0
|
||||||
|
|
||||||
# shellcheck source=shared.sh
|
# shellcheck source=shared.sh
|
||||||
source "$HOME/.dotfiles/config/shared.sh"
|
source "$DOTFILES/config/shared.sh"
|
||||||
|
|
||||||
msgr run "Starting to set macOS defaults, these require sudo privileges:"
|
msgr run "Starting to set macOS defaults, these require sudo privileges:"
|
||||||
|
|
||||||
@@ -23,12 +24,12 @@ while true; do
|
|||||||
done 2> /dev/null &
|
done 2> /dev/null &
|
||||||
|
|
||||||
# Skip when shell is fish
|
# Skip when shell is fish
|
||||||
if [[ $SHELL != $(which fish) ]]; then
|
if [[ $SHELL != "$(command -v fish)" ]]; then
|
||||||
msgr nested "Change user shell to zsh if it is available and not the current"
|
msgr nested "Change user shell to zsh if it is available and not the current"
|
||||||
|
|
||||||
# Change user shell to zsh if not that already.
|
# Change user shell to zsh if not that already.
|
||||||
if hash zsh 2> /dev/null; then
|
if hash zsh 2> /dev/null; then
|
||||||
[[ $SHELL != $(which zsh) ]] && chsh -s "$(which zsh)"
|
[[ $SHELL != "$(command -v zsh)" ]] && chsh -s "$(command -v zsh)"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,10 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
# @description Install npm packages globally.
|
# @description Install npm packages globally.
|
||||||
#
|
#
|
||||||
# shellcheck source=shared.sh
|
# shellcheck source=shared.sh
|
||||||
source "$DOTFILES/config/shared.sh"
|
source "$DOTFILES/config/shared.sh"
|
||||||
|
|
||||||
# Enable verbosity with VERBOSE=1
|
|
||||||
VERBOSE="${VERBOSE:-0}"
|
|
||||||
|
|
||||||
msgr msg "Starting to install npm packages"
|
msgr msg "Starting to install npm packages"
|
||||||
|
|
||||||
if ! command -v npm &> /dev/null; then
|
if ! command -v npm &> /dev/null; then
|
||||||
|
|||||||
@@ -1,12 +1,10 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
# @description Install ntfy
|
# @description Install ntfy
|
||||||
#
|
#
|
||||||
# shellcheck source=shared.sh
|
# shellcheck source=shared.sh
|
||||||
source "$DOTFILES/config/shared.sh"
|
source "$DOTFILES/config/shared.sh"
|
||||||
|
|
||||||
# Enable verbosity with VERBOSE=1
|
|
||||||
VERBOSE="${VERBOSE:-0}"
|
|
||||||
|
|
||||||
# Check if ntfy is already installed
|
# Check if ntfy is already installed
|
||||||
if x-have "ntfy"; then
|
if x-have "ntfy"; then
|
||||||
msgr "done" "ntfy already installed"
|
msgr "done" "ntfy already installed"
|
||||||
@@ -23,28 +21,31 @@ case $(dfm check arch) in
|
|||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
msgr err "Unsupported OS"
|
msgr err "Unsupported OS"
|
||||||
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
NTFY_VERSION="$(x-gh-get-latest-version binwiederhier/ntfy)"
|
NTFY_VERSION="$(x-gh-get-latest-version binwiederhier/ntfy)"
|
||||||
NTFY_URL="https://github.com/binwiederhier/ntfy"
|
NTFY_URL="https://github.com/binwiederhier/ntfy"
|
||||||
NTFY_DEST="/tmp/ntfy_${NTFY_VERSION}_${NTFY_ARCH}"
|
NTFY_TARBALL="ntfy_${NTFY_VERSION}_${NTFY_ARCH}.tar.gz"
|
||||||
|
NTFY_DIR="ntfy_${NTFY_VERSION}_${NTFY_ARCH}"
|
||||||
|
|
||||||
# Download and extract ntfy
|
# Download and extract ntfy
|
||||||
install_ntfy()
|
install_ntfy()
|
||||||
{
|
{
|
||||||
curl -L "$NTFY_URL/releases/download/v${NTFY_VERSION}/${NTFY_DEST}.tar.gz" -o "${NTFY_DEST}.tar.gz"
|
local tmpdir
|
||||||
tar zxvf "${NTFY_DEST}.tar.gz"
|
tmpdir="$(mktemp -d)"
|
||||||
cp -a "${NTFY_DEST}/ntfy" ~/.local/bin/ntfy
|
trap 'rm -rf "$tmpdir"' EXIT
|
||||||
|
|
||||||
|
curl -L "$NTFY_URL/releases/download/v${NTFY_VERSION}/${NTFY_TARBALL}" -o "$tmpdir/${NTFY_TARBALL}"
|
||||||
|
tar zxvf "$tmpdir/${NTFY_TARBALL}" -C "$tmpdir"
|
||||||
|
cp -a "$tmpdir/${NTFY_DIR}/ntfy" ~/.local/bin/ntfy
|
||||||
mkdir -p ~/.config/ntfy
|
mkdir -p ~/.config/ntfy
|
||||||
|
|
||||||
# Copy config only if it does not exist
|
# Copy config only if it does not exist
|
||||||
if [ ! -f "$HOME/.config/ntfy/client.yml" ]; then
|
if [ ! -f "$HOME/.config/ntfy/client.yml" ]; then
|
||||||
cp "${NTFY_DEST}/client/client.yml" ~/.config/ntfy/client.yml
|
cp "$tmpdir/${NTFY_DIR}/client/client.yml" ~/.config/ntfy/client.yml
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Clean up
|
|
||||||
rm -rf "${NTFY_DEST}" "${NTFY_DEST}.tar.gz"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
main()
|
main()
|
||||||
|
|||||||
@@ -1,12 +1,10 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
# @description Install Python packages using uv.
|
# @description Install Python packages using uv.
|
||||||
#
|
#
|
||||||
# shellcheck source=shared.sh
|
# shellcheck source=shared.sh
|
||||||
source "$DOTFILES/config/shared.sh"
|
source "$DOTFILES/config/shared.sh"
|
||||||
|
|
||||||
# Enable verbosity with VERBOSE=1
|
|
||||||
VERBOSE="${VERBOSE:-0}"
|
|
||||||
|
|
||||||
msgr run "Starting to install Python packages"
|
msgr run "Starting to install Python packages"
|
||||||
|
|
||||||
# Ensure uv is available
|
# Ensure uv is available
|
||||||
@@ -18,7 +16,8 @@ fi
|
|||||||
|
|
||||||
# CLI tools — installed isolated with `uv tool install`
|
# CLI tools — installed isolated with `uv tool install`
|
||||||
tools=(
|
tools=(
|
||||||
ansible # IT automation and configuration management
|
ansible # IT automation and configuration management
|
||||||
|
openapi-python-client # Generate Python API clients from OpenAPI specs
|
||||||
)
|
)
|
||||||
|
|
||||||
# Library packages — installed into system Python with `uv pip install --system`
|
# Library packages — installed into system Python with `uv pip install --system`
|
||||||
|
|||||||
@@ -1,11 +1,9 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
# @description Install XCode CLI Tools with osascript magic.
|
# @description Install XCode CLI Tools with osascript magic.
|
||||||
# Ismo Vuorinen <https://github.com/ivuorinen> 2018
|
# Ismo Vuorinen <https://github.com/ivuorinen> 2018
|
||||||
#
|
#
|
||||||
|
|
||||||
# Enable verbosity with VERBOSE=1
|
|
||||||
VERBOSE="${VERBOSE:-0}"
|
|
||||||
|
|
||||||
# Check if the script is running on macOS
|
# Check if the script is running on macOS
|
||||||
if [ "$(uname)" != "Darwin" ]; then
|
if [ "$(uname)" != "Darwin" ]; then
|
||||||
msgr warn "Not a macOS system"
|
msgr warn "Not a macOS system"
|
||||||
@@ -31,7 +29,7 @@ keep_alive_sudo()
|
|||||||
done 2> /dev/null &
|
done 2> /dev/null &
|
||||||
}
|
}
|
||||||
|
|
||||||
XCODE_TOOLS_PATH=$(xcode-select -p)
|
XCODE_TOOLS_PATH="$(xcode-select -p)"
|
||||||
XCODE_SWIFT_PATH="$XCODE_TOOLS_PATH/usr/bin/swift"
|
XCODE_SWIFT_PATH="$XCODE_TOOLS_PATH/usr/bin/swift"
|
||||||
|
|
||||||
# Function to prompt for XCode CLI Tools installation
|
# Function to prompt for XCode CLI Tools installation
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
# @description Install z
|
# @description Install z
|
||||||
#
|
#
|
||||||
# shellcheck source=shared.sh
|
# shellcheck source=shared.sh
|
||||||
|
|||||||
@@ -4,17 +4,8 @@
|
|||||||
# Helper env variables. Use like this: VERBOSE=1 ./script.sh
|
# Helper env variables. Use like this: VERBOSE=1 ./script.sh
|
||||||
: "${VERBOSE:=0}"
|
: "${VERBOSE:=0}"
|
||||||
|
|
||||||
# Set variable that checks if the shared.sh script has been
|
# Source the main shared config if not already loaded
|
||||||
# sourced only once If the script has been sourced more than once,
|
if [ -z "${SHARED_SCRIPTS_SOURCED:-}" ]; then
|
||||||
# the script not be sourced again.
|
|
||||||
[ -z "$SHARED_SCRIPTS_SOURCED" ] && {
|
|
||||||
|
|
||||||
source "${DOTFILES}/config/shared.sh"
|
source "${DOTFILES}/config/shared.sh"
|
||||||
# Warn the user if the shared configuration hasn't been loaded yet
|
|
||||||
msgr warn "(!) shared.sh not sourced"
|
|
||||||
|
|
||||||
# Set variable that checks if the shared.sh script has been
|
|
||||||
# sourced only once.
|
|
||||||
# shellcheck disable=SC2034
|
|
||||||
export SHARED_SCRIPTS_SOURCED=1
|
export SHARED_SCRIPTS_SOURCED=1
|
||||||
}
|
fi
|
||||||
|
|||||||
@@ -1,14 +0,0 @@
|
|||||||
#!/usr/bin/env bats
|
|
||||||
|
|
||||||
@test "x-mkd creates directory" {
|
|
||||||
dir="$BATS_TMPDIR/mkd-test"
|
|
||||||
run env VERBOSE=1 bash local/bin/x-mkd "$dir"
|
|
||||||
[ "$status" -eq 0 ]
|
|
||||||
[ -d "$dir" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
@test "x-mkd with no args shows usage" {
|
|
||||||
run bash local/bin/x-mkd
|
|
||||||
[ "$status" -eq 1 ]
|
|
||||||
[[ "$output" == "Usage:"* ]]
|
|
||||||
}
|
|
||||||
Submodule tools/dotbot-brew deleted from 98e346360b
Submodule tools/dotbot-pip deleted from 4d0cc116e8
@@ -1 +0,0 @@
|
|||||||
openapi-python-client
|
|
||||||
Reference in New Issue
Block a user