Compare commits

...

9 Commits

12 changed files with 165 additions and 68 deletions

45
.gitignore vendored
View File

@@ -1,32 +1,35 @@
Brewfile.lock.json !.gitkeep
lazy-lock.json
config/nvim/lazy-lock.json
*.log
*-secret *-secret
*.bak
*.log
*.socket
*cache *cache
.env
.idea .idea
.nfs*
.vscode .vscode
Brewfile.lock.json
antidote_plugins.zsh
config/alacritty/theme-active.toml
config/cheat/cheatsheets/pure-bash-bible/* config/cheat/cheatsheets/pure-bash-bible/*
config/cheat/cheatsheets/tldr/* config/cheat/cheatsheets/tldr/*
config/git/credentials config/git/credentials
config/npm/npmrc
config/zsh/.zcompdump
config/alacritty/theme-active.toml
ssh/local.d/*
!ssh/local.d/.gitkeep
!.gitkeep
.env
local/share/fonts/*
node_modules
.nfs*
*.socket
iTermServer-*
lock
config/iterm2/AppSupport
config/gnupg/S.* config/gnupg/S.*
config/gnupg/s
config/gnupg/private-keys-v1.d config/gnupg/private-keys-v1.d
config/gnupg/s
config/iterm2/AppSupport
config/npm/npmrc
config/nvim/lazy-lock.json
config/nvim/spell/* config/nvim/spell/*
!config/nvim/spell/.gitkeep !config/nvim/spell/.gitkeep
antidote_plugins.zsh config/zed/*
*.bak !config/zed/settings.json
config/zsh/.zcompdump
iTermServer-*
lazy-lock.json
local/share/fonts/*
local/bin/asdf/plugins/*
lock
node_modules
ssh/local.d/*
!ssh/local.d/.gitkeep

View File

@@ -3,6 +3,7 @@ repos:
rev: v5.0.0 rev: v5.0.0
hooks: hooks:
- id: requirements-txt-fixer - id: requirements-txt-fixer
- id: detect-aws-credentials
- id: detect-private-key - id: detect-private-key
- id: trailing-whitespace - id: trailing-whitespace
args: [--markdown-linebreak-ext=md] args: [--markdown-linebreak-ext=md]
@@ -43,12 +44,12 @@ repos:
- id: shfmt - id: shfmt
- repo: https://github.com/rhysd/actionlint - repo: https://github.com/rhysd/actionlint
rev: v1.7.4 rev: v1.7.5
hooks: hooks:
- id: actionlint - id: actionlint
- repo: https://github.com/renovatebot/pre-commit-hooks - repo: https://github.com/renovatebot/pre-commit-hooks
rev: 39.82.9 rev: 39.86.0
hooks: hooks:
- id: renovate-config-validator - id: renovate-config-validator

View File

@@ -24,3 +24,7 @@ disable=SC1091
# SC2174: When used with -p, -m only applies to the deepest directory. # SC2174: When used with -p, -m only applies to the deepest directory.
# https://github.com/koalaman/shellcheck/wiki/SC2174 # https://github.com/koalaman/shellcheck/wiki/SC2174
disable=SC2174 disable=SC2174
# SC2016: Expressions don't expand in single quotes, use double quotes for that.
# https://www.shellcheck.net/wiki/SC2016
disable=SC2016

View File

@@ -45,6 +45,7 @@ git submodule add --name tmux/tmux-dark-notify \
# Takes submodules and sets them to ignore all changes # Takes submodules and sets them to ignore all changes
for MODULE in $(git config --file .gitmodules --get-regexp path | awk '{ print $2 }'); do for MODULE in $(git config --file .gitmodules --get-regexp path | awk '{ print $2 }'); do
echo "Ignoring submodule changes for submodule.${MODULE}..."
git config "submodule.${MODULE}.ignore" all git config "submodule.${MODULE}.ignore" all
done done

View File

@@ -7,6 +7,10 @@ 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"

View File

@@ -45,6 +45,10 @@ setup_tmux_window_name_plugin()
fi fi
} }
if [[ -n $GHOSTTY_RESOURCES_DIR ]]; then
source "$GHOSTTY_RESOURCES_DIR"/shell-integration/zsh/ghostty-integration
fi
source_fzf_config source_fzf_config
setup_tmux_window_name_plugin setup_tmux_window_name_plugin
x-have antidot && eval "$(antidot init)" x-have antidot && eval "$(antidot init)"

View File

@@ -43,10 +43,6 @@ automatically-unhide-macos-hidden-apps = true
if.app-id = 'org.ferdium.ferdium-app' # Ferdium, has WhatsApp etc. if.app-id = 'org.ferdium.ferdium-app' # Ferdium, has WhatsApp etc.
run = ['layout floating'] run = ['layout floating']
[[on-window-detected]]
if.app-name-regex-substring = 'finder'
run = 'layout floating'
[[on-window-detected]] [[on-window-detected]]
if.app-id = 'com.apple.finder' # Finder if.app-id = 'com.apple.finder' # Finder
run = 'layout floating' run = 'layout floating'
@@ -68,11 +64,15 @@ if.app-id = 'org.whispersystems.signal-desktop' # Signal
run = 'layout floating' run = 'layout floating'
[[on-window-detected]] [[on-window-detected]]
if.app-id = 'com.tidal.desktop' if.app-id = 'com.tidal.desktop' # TIDAL
run = ['layout floating', 'move-node-to-workspace 2'] run = ['layout floating', 'move-node-to-workspace 2']
[[on-window-detected]] [[on-window-detected]]
if.app-id = 'com.apple.TV' if.app-id = 'com.apple.TV' # Apple TV app
run = 'layout floating'
[[on-window-detected]]
if.app-id = 'com.setapp.DesktopClient'
run = 'layout floating' run = 'layout floating'
# Possible values: (qwerty|dvorak) # Possible values: (qwerty|dvorak)
@@ -90,7 +90,6 @@ preset = 'qwerty'
[gaps] [gaps]
inner.horizontal = 5 inner.horizontal = 5
inner.vertical = 5 inner.vertical = 5
# outer.top = 0
outer.top = [{ monitor.'^built-in retina display$' = 0 }, 0] outer.top = [{ monitor.'^built-in retina display$' = 0 }, 0]
outer.right = 0 outer.right = 0
outer.bottom = 0 outer.bottom = 0
@@ -126,13 +125,9 @@ outer.left = 0
# end tell' # end tell'
# ''' # '''
alt-cmd-shift-f = 'fullscreen' # alt-cmd-shift-f = 'fullscreen'
alt-cmd-f = 'layout floating' # alt-shift-f = 'layout floating'
# alt-shift-tab = 'move-workspace-to-monitor --wrap-around next'
alt-cmd-left = 'join-with left'
alt-cmd-down = 'join-with down'
alt-cmd-up = 'join-with up'
alt-cmd-right = 'join-with right'
# See: https://nikitabobko.github.io/AeroSpace/commands#focus # See: https://nikitabobko.github.io/AeroSpace/commands#focus
alt-h = 'focus left' alt-h = 'focus left'
@@ -140,38 +135,53 @@ alt-j = 'focus down'
alt-k = 'focus up' alt-k = 'focus up'
alt-l = 'focus right' alt-l = 'focus right'
# See: https://nikitabobko.github.io/AeroSpace/commands#move
alt-shift-h = 'move left'
alt-shift-j = 'move down'
alt-shift-k = 'move up'
alt-shift-l = 'move right'
# See: https://nikitabobko.github.io/AeroSpace/commands#workspace # See: https://nikitabobko.github.io/AeroSpace/commands#workspace
cmd-shift-1 = 'workspace 1' # Main alt-shift-1 = 'workspace 1' # Main
cmd-shift-2 = 'workspace 2' # Music alt-shift-2 = 'workspace 2' # Media
# See: https://nikitabobko.github.io/AeroSpace/commands#move-node-to-workspace
alt-cmd-1 = 'move-node-to-workspace 1 --focus-follows-window'
alt-cmd-2 = 'move-node-to-workspace 2 --focus-follows-window'
shift-tab = 'workspace-back-and-forth' shift-tab = 'workspace-back-and-forth'
# alt-shift-tab = 'move-workspace-to-monitor --wrap-around next'
# See: https://nikitabobko.github.io/AeroSpace/commands#mode # See: https://nikitabobko.github.io/AeroSpace/commands#mode
# See: https://nikitabobko.github.io/AeroSpace/guide#binding-modes # See: https://nikitabobko.github.io/AeroSpace/guide#binding-modes
alt-a = 'mode apps' alt-a = 'mode apps'
alt-s = 'mode service' alt-s = 'mode service'
alt-d = 'mode resize' alt-d = 'mode resize'
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'
# ╭──────────────────────────────────────────────────────────╮
# │ alt-a │
# ╰──────────────────────────────────────────────────────────╯
[mode.apps.binding] [mode.apps.binding]
esc = ['reload-config', 'mode main'] esc = ['reload-config', 'mode main']
alt-b = ['exec-and-forget open -a /Applications/Brave Browser.app', 'mode main'] b = ['exec-and-forget open -a /Applications/Brave Browser.app', 'mode main']
alt-c = ['exec-and-forget open -a /Applications/Ferdium.app', 'mode main'] c = ['exec-and-forget open -a /Applications/Ferdium.app', 'mode main']
alt-o = ['exec-and-forget open -a /Applications/Obsidian.app', 'mode main'] o = ['exec-and-forget open -a /Applications/Obsidian.app', 'mode main']
alt-s = ['exec-and-forget open -a /Applications/Slack.app', 'mode main'] s = ['exec-and-forget open -a /Applications/Slack.app', 'mode main']
alt-t = ['exec-and-forget open -a /Applications/TIDAL.app', 'mode main'] t = ['exec-and-forget open -a /Applications/TIDAL.app', 'mode main']
alt-w = ['exec-and-forget open -a /Applications/WezTerm.app', 'mode main'] w = ['exec-and-forget open -a /Applications/WezTerm.app', 'mode main']
# ╭──────────────────────────────────────────────────────────╮
# │ alt-s │
# ╰──────────────────────────────────────────────────────────╯
[mode.service.binding] [mode.service.binding]
esc = ['reload-config', 'mode main'] esc = ['reload-config', 'mode main']
r = ['flatten-workspace-tree', 'mode main'] # reset layout r = ['flatten-workspace-tree', 'mode main'] # reset layout
@@ -179,9 +189,12 @@ r = ['flatten-workspace-tree', 'mode main'] # reset layout
f = ['layout floating tiling', 'mode main'] # Toggle between floating and tiling layout f = ['layout floating tiling', 'mode main'] # Toggle between floating and tiling layout
backspace = ['close-all-windows-but-current', 'mode main'] backspace = ['close-all-windows-but-current', 'mode main']
# ╭──────────────────────────────────────────────────────────╮
# │ alt-d │
# ╰──────────────────────────────────────────────────────────╯
[mode.resize.binding] [mode.resize.binding]
esc = ['reload-config', 'mode main']
# See: https://nikitabobko.github.io/AeroSpace/commands#resize # See: https://nikitabobko.github.io/AeroSpace/commands#resize
r = ['flatten-workspace-tree', 'mode main'] # reset layout r = ['flatten-workspace-tree', 'mode main'] # reset layout
h = 'resize smart -70' h = 'resize smart -70'
l = 'resize smart +70' l = 'resize smart +70'
esc = ['reload-config', 'mode main']

View File

@@ -281,8 +281,8 @@ export LESSHISTFILE="$XDG_STATE_HOME"/less/history
# export LESS_TERMCAP_md="$ORANGE" # export LESS_TERMCAP_md="$ORANGE"
# zsh autoloaded terminfo # zsh autoloaded terminfo
export TERMINFO="${XDG_DATA_HOME}/terminfo" # export TERMINFO="${XDG_DATA_HOME}/terminfo"
export TERMINFO_DIRS="${XDG_DATA_HOME}/terminfo":/usr/share/terminfo # export TERMINFO_DIRS="${XDG_DATA_HOME}/terminfo":/usr/share/terminfo
# Don't clear the screen after quitting a manual page # Don't clear the screen after quitting a manual page
export MANPAGER="less -X" export MANPAGER="less -X"

4
config/ghostty/config Normal file
View File

@@ -0,0 +1,4 @@
# vim: ft=ghostty
shell-integration-features = true
theme = "light:tokyonight-day,dark:tokyonight-storm"
font-family = "JetBrainsMono Nerd Font Mono"

6
config/glow/glow.yml Normal file
View File

@@ -0,0 +1,6 @@
# mouse support (TUI-mode only)
mouse: false
# use pager to display markdown
pager: true
# word-wrap at width
width: 80

57
config/zed/settings.json Normal file
View File

@@ -0,0 +1,57 @@
{
"formatter": {
"external": {
"command": "node_modules/.bin/prettier",
"arguments": [
"--stdin-filepath",
"{buffer_path}"
]
}
},
"languages": {
"Lua": {
"enable_language_server": true,
"tab_size": 2
}
},
"lsp": {
"gopls": {
"initialization_options": {
"hints": {
"assignVariableTypes": true,
"compositeLiteralFields": true,
"compositeLiteralTypes": true,
"constantValues": true,
"functionTypeParameters": true,
"parameterNames": true,
"rangeVariableTypes": true
}
}
}
},
"preferred_line_length": 100,
"format_on_save": "on",
"vim_mode": true,
"theme": {
"mode": "system",
"light": "Tokyo Night Light",
"dark": "Tokyo Night Storm"
},
"inlay_hints": {
"enabled": true,
"show_type_hints": true,
"show_parameter_hints": true,
"show_other_hints": true
},
"ui_font_size": 16,
"buffer_font_size": 16,
"buffer_font_fallbacks": [
"JetBrainsMono Nerd Font"
],
"inline_completions": {
"disabled_globs": [
".env"
]
},
"hour_format": "hour24"
}

View File

@@ -131,7 +131,7 @@ section_install()
asdf) asdf)
msgr run "Installing asdf..." msgr run "Installing asdf..."
$0 asdf plugins-add \ $0 asdf plugins-install \
&& msgr yay "asdf plugins installed!" && msgr yay "asdf plugins installed!"
;; ;;
@@ -355,30 +355,30 @@ section_asdf()
plugins-install) plugins-install)
msgr run "Installing plugins from configuration" msgr run "Installing plugins from configuration"
# Asennetaan ensin direnv jos sitä ei ole # First install direnv if it's not installed
if ! asdf plugin list | grep -q "^direnv$"; then if ! asdf plugin list | grep -q "^direnv$"; then
msgr nested "Installing direnv plugin" msgr nested "Installing direnv plugin"
asdf plugin add direnv https://github.com/asdf-community/asdf-direnv.git asdf plugin add direnv https://github.com/asdf-community/asdf-direnv.git
# Asennetaan direnv latest # Install latest direnv
local latest_direnv local latest_direnv
latest_direnv=$(asdf latest direnv) latest_direnv=$(asdf latest direnv)
asdf install direnv "$latest_direnv" asdf install direnv "$latest_direnv"
asdf global direnv "$latest_direnv" asdf global direnv "$latest_direnv"
fi fi
# Tarkistetaan että kaikki konfiguroidut pluginit on asennettu # Check that all plugins are installed
local installed_plugins local installed_plugins
installed_plugins=$(asdf plugin list) installed_plugins=$(asdf plugin list)
while IFS= read -r line; do while IFS= read -r line; do
# Ohita tyhjät rivit ja kommentit # Skip empty lines and comments
[[ -z $line || $line =~ ^# ]] && continue [[ -z $line || $line =~ ^# ]] && continue
local plugin local plugin
plugin=$(echo "$line" | awk '{print $1}') plugin=$(echo "$line" | awk '{print $1}')
# Ohita direnv, käsiteltiin jo # Skip direnv, it's already installed
[[ $plugin == "direnv" ]] && continue [[ $plugin == "direnv" ]] && continue
if ! echo "$installed_plugins" | grep -q "^${plugin}$"; then if ! echo "$installed_plugins" | grep -q "^${plugin}$"; then
@@ -437,10 +437,11 @@ section_asdf()
local installed_plugins local installed_plugins
installed_plugins=$(asdf plugin list | sort) installed_plugins=$(asdf plugin list | sort)
# Compare .tool-versions and installed plugins, remove unknown plugins from .tool-versions # Compare .tool-versions and installed plugins,
# remove unknown plugins from .tool-versions
msgr nested "Updating tool-versions file" msgr nested "Updating tool-versions file"
while IFS= read -r line; do while IFS= read -r line; do
# Säilytä kommentit ja tyhjät rivit # Keep comments and empty lines
if [[ -z $line || $line =~ ^[[:space:]]*# ]]; then if [[ -z $line || $line =~ ^[[:space:]]*# ]]; then
echo "$line" >> "$temp_file" echo "$line" >> "$temp_file"
continue continue
@@ -494,7 +495,6 @@ section_helpers()
"env:Show environment variables" "env:Show environment variables"
"functions:Show functions" "functions:Show functions"
"nvim:Show nvim keybindings" "nvim:Show nvim keybindings"
# shellcheck disable=SC2016
'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"