feat: yazi plugins [glow, projects, custom_scripts-set_wallpaper]
This commit is contained in:
5
.config/custom_scripts/osx/set_wallpaper.sh
Executable file
5
.config/custom_scripts/osx/set_wallpaper.sh
Executable file
@ -0,0 +1,5 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -eaou pipefail
|
||||||
|
|
||||||
|
osascript -e 'tell application "System Events" to set picture of every desktop to "'"$1"'"'
|
41
.config/wezterm/modules/hyperlinks.lua
Normal file
41
.config/wezterm/modules/hyperlinks.lua
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
return {
|
||||||
|
-- Matches: a URL in parens: (URL)
|
||||||
|
{
|
||||||
|
regex = "\\((\\w+://\\S+)\\)",
|
||||||
|
format = "$1",
|
||||||
|
highlight = 1,
|
||||||
|
},
|
||||||
|
-- Matches: a URL in brackets: [URL]
|
||||||
|
{
|
||||||
|
regex = "\\[(\\w+://\\S+)\\]",
|
||||||
|
format = "$1",
|
||||||
|
highlight = 1,
|
||||||
|
},
|
||||||
|
-- Matches: a URL in curly braces: {URL}
|
||||||
|
{
|
||||||
|
regex = "\\{(\\w+://\\S+)\\}",
|
||||||
|
format = "$1",
|
||||||
|
highlight = 1,
|
||||||
|
},
|
||||||
|
-- Matches: a URL in angle brackets: <URL>
|
||||||
|
{
|
||||||
|
regex = "<(\\w+://\\S+)>",
|
||||||
|
format = "$1",
|
||||||
|
highlight = 1,
|
||||||
|
},
|
||||||
|
-- Then handle URLs not wrapped in brackets
|
||||||
|
{
|
||||||
|
-- Before
|
||||||
|
--regex = '\\b\\w+://\\S+[)/a-zA-Z0-9-]+',
|
||||||
|
--format = '$0',
|
||||||
|
-- After
|
||||||
|
regex = "[^(]\\b(\\w+://\\S+[)/a-zA-Z0-9-]+)",
|
||||||
|
format = "$1",
|
||||||
|
highlight = 1,
|
||||||
|
},
|
||||||
|
-- implicit mailto link
|
||||||
|
{
|
||||||
|
regex = "\\b\\w+@[\\w-]+(\\.[\\w-]+)+\\b",
|
||||||
|
format = "mailto:$0",
|
||||||
|
},
|
||||||
|
}
|
@ -2,7 +2,7 @@ local wezterm = require("wezterm")
|
|||||||
local act = wezterm.action
|
local act = wezterm.action
|
||||||
|
|
||||||
return {
|
return {
|
||||||
leader = { key = "a", mods = "CTRL", timeout_milliseconds = 1002 },
|
leader = { key = "z", mods = "CTRL", timeout_milliseconds = 1002 },
|
||||||
|
|
||||||
keys = {
|
keys = {
|
||||||
{
|
{
|
||||||
|
@ -14,7 +14,7 @@ local config = {
|
|||||||
font = wezterm.font("JetBrains Mono", { weight = "Medium" }),
|
font = wezterm.font("JetBrains Mono", { weight = "Medium" }),
|
||||||
font_size = 12,
|
font_size = 12,
|
||||||
line_height = 1.0,
|
line_height = 1.0,
|
||||||
window_background_opacity = 0.8,
|
window_background_opacity = 0.97,
|
||||||
-- tab bar
|
-- tab bar
|
||||||
use_fancy_tab_bar = true,
|
use_fancy_tab_bar = true,
|
||||||
tab_bar_at_bottom = false,
|
tab_bar_at_bottom = false,
|
||||||
@ -38,6 +38,7 @@ local config = {
|
|||||||
keys = mappings.keys,
|
keys = mappings.keys,
|
||||||
key_tables = mappings.key_tables,
|
key_tables = mappings.key_tables,
|
||||||
hyperlink_rules = hyperlinks,
|
hyperlink_rules = hyperlinks,
|
||||||
|
audible_bell = "Disabled",
|
||||||
}
|
}
|
||||||
|
|
||||||
-- sessions.apply_to_config(config) -- optional, this adds default keybindings
|
-- sessions.apply_to_config(config) -- optional, this adds default keybindings
|
||||||
|
@ -15,3 +15,26 @@ require("bookmarks"):setup({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
require("projects"):setup({
|
||||||
|
save = {
|
||||||
|
method = "yazi", -- yazi | lua
|
||||||
|
lua_save_path = "", -- comment out to get the default value
|
||||||
|
-- windows: "%APPDATA%/yazi/state/projects.json"
|
||||||
|
-- unix: "~/.local/state/yazi/projects.json"
|
||||||
|
},
|
||||||
|
last = {
|
||||||
|
update_after_save = true,
|
||||||
|
update_after_load = true,
|
||||||
|
load_after_start = false,
|
||||||
|
},
|
||||||
|
merge = {
|
||||||
|
quit_after_merge = false,
|
||||||
|
},
|
||||||
|
notify = {
|
||||||
|
enable = true,
|
||||||
|
title = "Projects",
|
||||||
|
timeout = 3,
|
||||||
|
level = "info",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
@ -17,3 +17,43 @@ desc = "Delete a bookmark"
|
|||||||
on = [ "b", "D" ]
|
on = [ "b", "D" ]
|
||||||
run = "plugin bookmarks delete_all"
|
run = "plugin bookmarks delete_all"
|
||||||
desc = "Delete all bookmarks"
|
desc = "Delete all bookmarks"
|
||||||
|
|
||||||
|
[[manager.prepend_keymap]]
|
||||||
|
on = [ "P", "s" ]
|
||||||
|
run = "plugin projects save"
|
||||||
|
desc = "Save current project"
|
||||||
|
|
||||||
|
[[manager.prepend_keymap]]
|
||||||
|
on = [ "P", "l" ]
|
||||||
|
run = "plugin projects load"
|
||||||
|
desc = "Load project"
|
||||||
|
|
||||||
|
[[manager.prepend_keymap]]
|
||||||
|
on = [ "P", "P" ]
|
||||||
|
run = "plugin projects load_last"
|
||||||
|
desc = "Load last project"
|
||||||
|
|
||||||
|
[[manager.prepend_keymap]]
|
||||||
|
on = [ "P", "d" ]
|
||||||
|
run = "plugin projects delete"
|
||||||
|
desc = "Delete project"
|
||||||
|
|
||||||
|
[[manager.prepend_keymap]]
|
||||||
|
on = [ "P", "D" ]
|
||||||
|
run = "plugin projects delete_all"
|
||||||
|
desc = "Delete all projects"
|
||||||
|
|
||||||
|
[[manager.prepend_keymap]]
|
||||||
|
on = [ "P", "m" ]
|
||||||
|
run = "plugin projects 'merge current'"
|
||||||
|
desc = "Merge current tab to other projects"
|
||||||
|
|
||||||
|
[[manager.prepend_keymap]]
|
||||||
|
on = [ "P", "M" ]
|
||||||
|
run = "plugin projects 'merge all'"
|
||||||
|
desc = "Merge current project to other projects"
|
||||||
|
|
||||||
|
[[manager.prepend_keymap]]
|
||||||
|
on = ["C", "w"]
|
||||||
|
run = 'shell -- ${HOME}/.config/custom_scripts/osx/set_wallpaper.sh "$1"'
|
||||||
|
desc = "Set wallpaper"
|
||||||
|
@ -3,6 +3,16 @@ use = "dedukun/bookmarks"
|
|||||||
rev = "95b2c58"
|
rev = "95b2c58"
|
||||||
hash = "17a094653b7d0db4ac68ed531d2e1412"
|
hash = "17a094653b7d0db4ac68ed531d2e1412"
|
||||||
|
|
||||||
|
[[plugin.deps]]
|
||||||
|
use = "Reledia/glow"
|
||||||
|
rev = "c76bf4f"
|
||||||
|
hash = "a6b78bf9af5390e3a85a6951fbb7b93"
|
||||||
|
|
||||||
|
[[plugin.deps]]
|
||||||
|
use = "MasouShizuka/projects"
|
||||||
|
rev = "4f11ecc"
|
||||||
|
hash = "17fa17295d27864f62875f06a77f72e7"
|
||||||
|
|
||||||
[[flavor.deps]]
|
[[flavor.deps]]
|
||||||
use = "BennyOe/tokyo-night"
|
use = "BennyOe/tokyo-night"
|
||||||
rev = "695dac6"
|
rev = "695dac6"
|
||||||
|
@ -10,5 +10,10 @@ show_hidden = true
|
|||||||
show_symlink = true
|
show_symlink = true
|
||||||
scrolloff = 5
|
scrolloff = 5
|
||||||
mouse_events = ["click", "scroll"]
|
mouse_events = ["click", "scroll"]
|
||||||
# title_format = "Yazi: {cwd}"
|
#title_format = "Yazi: {cwd}"
|
||||||
|
|
||||||
|
[plugin]
|
||||||
|
prepend_previewers = [
|
||||||
|
{ name = "*.md", run = "glow" },
|
||||||
|
]
|
||||||
|
|
||||||
|
@ -35,3 +35,7 @@
|
|||||||
lgdu = !git lgd $( git rev-parse --symbolic @{u} ) HEAD
|
lgdu = !git lgd $( git rev-parse --symbolic @{u} ) HEAD
|
||||||
; lg me: my commits from all branches, by date
|
; lg me: my commits from all branches, by date
|
||||||
lgme = !git lgd --author=\"$( git config --get user.name )\" --all
|
lgme = !git lgd --author=\"$( git config --get user.name )\" --all
|
||||||
|
; git log time tracking
|
||||||
|
ltime = !git --no-pager log --date=iso --since='6 months' --date-order --full-history --all --pretty=tformat:'%C(cyan)%ad%x08%x08%x08%x08%x08%x08%x08%x08%x08 %C(bold red)%h %C(bold blue)%<(22)%ae %C(reset)%s'
|
||||||
|
[core]
|
||||||
|
excludesfile = /Users/paramah/.gitignore
|
||||||
|
58
.zshrc
58
.zshrc
@ -1,9 +1,3 @@
|
|||||||
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
|
|
||||||
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
source $(brew --prefix)/share/powerlevel10k/powerlevel10k.zsh-theme
|
|
||||||
source ~/.zprofile
|
source ~/.zprofile
|
||||||
autoload -Uz compinit
|
autoload -Uz compinit
|
||||||
compinit
|
compinit
|
||||||
@ -13,7 +7,6 @@ compinit
|
|||||||
|
|
||||||
# Path to your Oh My Zsh installation.
|
# Path to your Oh My Zsh installation.
|
||||||
export ZSH="$HOME/.oh-my-zsh"
|
export ZSH="$HOME/.oh-my-zsh"
|
||||||
ZSH_THEME="robbyrussell"
|
|
||||||
|
|
||||||
plugins=(
|
plugins=(
|
||||||
git
|
git
|
||||||
@ -50,7 +43,9 @@ source $HOME/.oh-my-zsh/custom/plugins/fzf-tab-completion/zsh/fzf-zsh-completion
|
|||||||
zstyle ':completion:*' fzf-search-display true
|
zstyle ':completion:*' fzf-search-display true
|
||||||
zstyle ':completion::*:cd::*' fzf-cd-widget
|
zstyle ':completion::*:cd::*' fzf-cd-widget
|
||||||
zstyle ':completion::*:ls::*' fzf-completion-opts --preview='eval head {1}'
|
zstyle ':completion::*:ls::*' fzf-completion-opts --preview='eval head {1}'
|
||||||
|
zstyle ':completion::*:lsd::*' fzf-completion-opts --preview='eval head -n30 {1}'
|
||||||
zstyle ':completion::*:cat::*' fzf-completion-opts --preview='eval head {1}'
|
zstyle ':completion::*:cat::*' fzf-completion-opts --preview='eval head {1}'
|
||||||
|
zstyle ':completion::*:nvim::*' fzf-completion-opts --preview='eval head {1}'
|
||||||
|
|
||||||
|
|
||||||
# Map widgets to key
|
# Map widgets to key
|
||||||
@ -69,21 +64,10 @@ bindkey '^xn' fzf-insert-named-directory
|
|||||||
|
|
||||||
## Git
|
## Git
|
||||||
bindkey '^@g' fzf-select-git-widget
|
bindkey '^@g' fzf-select-git-widget
|
||||||
bindkey '^@ga' fzf-git-add-files
|
bindkey '^@a' fzf-git-add-files
|
||||||
bindkey '^@gc' fzf-git-change-repository
|
bindkey '^@gc' fzf-git-change-repository
|
||||||
|
|
||||||
# GitHub
|
# zplug load
|
||||||
bindkey '^@h' fzf-select-github-widget
|
|
||||||
bindkey '^@hs' fzf-github-show-issue
|
|
||||||
bindkey '^@hc' fzf-github-close-issue
|
|
||||||
|
|
||||||
## Docker
|
|
||||||
bindkey '^@d' fzf-select-docker-widget
|
|
||||||
bindkey '^@dc' fzf-docker-remove-containers
|
|
||||||
bindkey '^@di' fzf-docker-remove-images
|
|
||||||
bindkey '^@dv' fzf-docker-remove-volumes
|
|
||||||
|
|
||||||
zplug load
|
|
||||||
|
|
||||||
# ___ _ __ ___ ____
|
# ___ _ __ ___ ____
|
||||||
# / _ \| '_ ` _ \|_ /
|
# / _ \| '_ ` _ \|_ /
|
||||||
@ -94,23 +78,53 @@ source $ZSH/oh-my-zsh.sh
|
|||||||
|
|
||||||
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
||||||
|
|
||||||
|
# My secrets and configs
|
||||||
|
[[ ! -f ~/.exports ]] || source ~/.exports
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
autoload bashcompinit
|
autoload bashcompinit
|
||||||
bashcompinit
|
bashcompinit
|
||||||
|
|
||||||
|
# yazi cwd wrapper
|
||||||
|
function y() {
|
||||||
|
local tmp="$(mktemp -t "yazi-cwd.XXXXXX")" cwd
|
||||||
|
yazi "$@" --cwd-file="$tmp"
|
||||||
|
if cwd="$(command cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then
|
||||||
|
builtin cd -- "$cwd"
|
||||||
|
fi
|
||||||
|
rm -f -- "$tmp"
|
||||||
|
}
|
||||||
|
|
||||||
# Default aliases
|
# Default aliases
|
||||||
alias vim="nvim"
|
alias vim="nvim"
|
||||||
alias j="jump"
|
alias j="jump"
|
||||||
alias b="bookmark"
|
alias b="bookmark"
|
||||||
alias ls="lsd"
|
alias ls="eza --git-repos --git"
|
||||||
alias y="yazi"
|
alias tailscale="/Applications/Tailscale.app/Contents/MacOS/Tailscale"
|
||||||
|
|
||||||
eval "$(/opt/homebrew/bin/brew shellenv)"
|
eval "$(/opt/homebrew/bin/brew shellenv)"
|
||||||
|
eval "$(gopass completion zsh)"
|
||||||
|
|
||||||
# Add Visual Studio Code (code)
|
# Add Visual Studio Code (code)
|
||||||
export PATH="$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin"
|
export PATH="$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin"
|
||||||
export PATH="$PATH:$HOME/tools/git-scripts"
|
export PATH="$PATH:$HOME/tools/git-scripts"
|
||||||
|
export PATH="$PATH:/usr/local/share/dotnet"
|
||||||
export EDITOR=nvim
|
export EDITOR=nvim
|
||||||
|
|
||||||
# Added by LM Studio CLI (lms)
|
# Added by LM Studio CLI (lms)
|
||||||
export PATH="$PATH:/Users/paramah/.lmstudio/bin"
|
export PATH="$PATH:/Users/paramah/.lmstudio/bin"
|
||||||
|
|
||||||
|
# bun completions
|
||||||
|
[ -s "/Users/paramah/.bun/_bun" ] && source "/Users/paramah/.bun/_bun"
|
||||||
|
|
||||||
|
# bun
|
||||||
|
export BUN_INSTALL="$HOME/.bun"
|
||||||
|
export PATH="$BUN_INSTALL/bin:$PATH"
|
||||||
|
|
||||||
|
source $HOME/.atuin/bin/env
|
||||||
|
eval "$(oh-my-posh init zsh)"
|
||||||
|
|
||||||
|
. "$HOME/.atuin/bin/env"
|
||||||
|
|
||||||
|
eval "$(atuin init zsh)"
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
# [](https://skillicons.dev) dotfiles
|
# [](https://skillicons.dev) dotfiles
|
||||||
|
|
||||||
Do zarządzania konfiguracją używany jest [yadm]()
|
Do zarządzania konfiguracją używany jest [yadm](https://yadm.io/)
|
||||||
|
|
||||||
|
Moje leciwe, acz nie najstarsze: [dotfiles](https://git.cynarski.pl/myEnv/dotfiles)
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Reference in New Issue
Block a user