New plugins for nvim, changed the screenshot methods for hyprland so now im using hyprshot, changed fish plugins and variables, delta for preview difference of two files on git and other misc stuff

This commit is contained in:
Sergio Laín 2023-08-19 14:53:08 +02:00
parent 14d92d46ef
commit e6c940f4bc
35 changed files with 1422 additions and 100 deletions

View file

@ -2,12 +2,12 @@
"settings": {
"tabs": [
{
"name": "#multimedia-general",
"url": "/channels/674984102860161025/675014488097030153",
"name": "#noticias_mc",
"url": "/channels/674984102860161025/710809301400158238",
"selected": true,
"currentStatus": "none",
"iconUrl": "https://cdn.discordapp.com/icons/674984102860161025/a4c5c84a118b923dfe68dccd886d1d87.webp?size=40",
"channelId": "675014488097030153"
"channelId": "710809301400158238"
},
{
"name": "#feedback-and-suggestions",
@ -26,12 +26,12 @@
"channelId": "923262113500246027"
},
{
"name": "@spider300",
"url": "/channels/@me/347377928914337792",
"name": "@Sergio Laín",
"url": "/channels/@me/1107960185529581679",
"selected": false,
"currentStatus": "online",
"iconUrl": "https://cdn.discordapp.com/avatars/346980245028601857/fa3802f0571349385c58a99e46c4ff07.webp?size=40",
"channelId": "347377928914337792"
"currentStatus": "offline",
"iconUrl": "https://cdn.discordapp.com/avatars/1087642197685452850/b61c2b287c9f9e3e31a5a9741884a33d.webp?size=40",
"channelId": "1107960185529581679"
}
],
"favs": [],

View file

@ -157,6 +157,28 @@
{
"id": "vscode.menubar.separator"
},
{
"id": "openRecentFile",
"uri": {
"$mid": 1,
"external": "file:///home/matt/.config/xplr/init.lua",
"path": "/home/matt/.config/xplr/init.lua",
"scheme": "file"
},
"enabled": true,
"label": "~/.config/xplr/init.lua"
},
{
"id": "openRecentFile",
"uri": {
"$mid": 1,
"external": "file:///docs/Documentos/Repos/Clase/2%C2%BADAM/PSP/README.md",
"path": "/docs/Documentos/Repos/Clase/2ºDAM/PSP/README.md",
"scheme": "file"
},
"enabled": true,
"label": "/docs/Documentos/Repos/Clase/2ºDAM/PSP/README.md"
},
{
"id": "openRecentFile",
"uri": {
@ -223,17 +245,6 @@
"enabled": true,
"label": "~/.config/fish/aliases.fish"
},
{
"id": "openRecentFile",
"uri": {
"$mid": 1,
"external": "file:///home/matt/.config/xplr/init.lua",
"path": "/home/matt/.config/xplr/init.lua",
"scheme": "file"
},
"enabled": true,
"label": "~/.config/xplr/init.lua"
},
{
"id": "openRecentFile",
"uri": {
@ -256,17 +267,6 @@
"enabled": true,
"label": "/opt/vscodium-bin/resources/app/product.json"
},
{
"id": "openRecentFile",
"uri": {
"$mid": 1,
"external": "file:///home/matt/.vscode/extensions/github.copilot-1.96.255/dist/extension.js",
"path": "/home/matt/.vscode/extensions/github.copilot-1.96.255/dist/extension.js",
"scheme": "file"
},
"enabled": true,
"label": "~/.vscode/extensions/github.copilot-1.96.255/dist/extension.js"
},
{
"id": "vscode.menubar.separator"
},
@ -312,8 +312,7 @@
},
{
"id": "saveAll",
"label": "Save A&&ll",
"enabled": false
"label": "Save A&&ll"
},
{
"id": "vscode.menubar.separator"
@ -492,10 +491,6 @@
"id": "workbench.action.closeActiveEditor",
"label": "&&Close Editor"
},
{
"id": "workbench.action.closeFolder",
"label": "Close &&Folder"
},
{
"id": "workbench.action.closeWindow",
"label": "Clos&&e Window"
@ -689,8 +684,7 @@
},
{
"id": "workbench.action.toggleSidebarVisibility",
"label": "&&Primary Side Bar",
"checked": true
"label": "&&Primary Side Bar"
},
{
"id": "workbench.action.toggleAuxiliaryBar",
@ -1452,11 +1446,6 @@
"label": "Ctrl+W",
"userSettingsLabel": "ctrl+w"
},
"workbench.action.closeFolder": {
"label": "Ctrl+K F",
"isNative": false,
"userSettingsLabel": "ctrl+k f"
},
"workbench.action.closeWindow": {
"label": "Alt+F4",
"userSettingsLabel": "alt+f4"
@ -1816,21 +1805,20 @@
"editorPartMinWidth": 220,
"titleBarHeight": 0,
"activityBarWidth": 48,
"sideBarWidth": 310,
"sideBarWidth": 0,
"statusBarHeight": 0,
"windowBorder": false
}
},
"windowsState": {
"lastActiveWindow": {
"folder": "file:///home/matt/.config",
"backupPath": "/home/matt/.config/VSCodium/Backups/375730732710406c4b825f9cde716ece",
"backupPath": "/home/matt/.config/VSCodium/Backups/1692447698773",
"uiState": {
"mode": 1,
"x": 0,
"y": 0,
"width": 1246,
"height": 976
"x": 1019,
"y": 1095,
"width": 1405,
"height": 933
}
},
"openedWindows": []
@ -1843,15 +1831,13 @@
},
{
"folderUri": "file:///home/matt/.config/awesome"
},
{
"folderUri": "file:///docs/Documentos/Repos/Personal/StartPageStatic"
},
{
"folderUri": "file:///home/matt/.config"
}
],
"emptyWindows": []
"emptyWindows": [
{
"backupFolder": "1692447698773"
}
]
},
"userDataProfilesMigration": true,
"profileAssociations": {
@ -1921,7 +1907,9 @@
"file:///docs/Documentos/Repos/Personal/StartPageStatic": "-1645caa6",
"file:///home/matt/.config": "-1645caa6"
},
"emptyWindows": {}
"emptyWindows": {
"1692447698773": "-1645caa6"
}
},
"profileAssociationsMigration": true,
"userDataProfiles": [

View file

@ -140,7 +140,7 @@
"terminal.integrated.shellIntegration.suggestEnabled": true,
"catppuccin.extraBordersEnabled": true,
"codeium.enableSearch": true,
"editor.matchBrackets": "never",
"editor.matchBrackets": false,
"files.trimTrailingWhitespace": true,
"[markdown]": {
"files.trimTrailningWhitespace": false,

View file

@ -28,3 +28,4 @@ alias vi='nvim'
alias fsend='floaterm'
alias dsize='dua i'
alias f='neofetch'
alias fzfp='fzf --preview "bat --color=always --style=header,grid --line-range :500 {}"'

View file

@ -0,0 +1,101 @@
#compdef git-forgit
#description Utility tool for using git interactively
#
# forgit completions for zsh
#
# Place this file in your $fpath (e.g. /usr/share/zsh/site-functions) to enable
# tab completions for forgit as a git subcommmand. When using forgit as a shell
# plugin, additionally source completions/git-forgit.zsh after
# forgit.plugin.zsh to enable tab completion for shell functions and aliases.
_git-branches() {
_alternative "branches:branchname:($(git branch -a --format '%(refname:short)'))"
}
_git-checkout-file() {
_alternative "files:filename:($(git ls-files --modified))"
}
_git-stash-show() {
_alternative "files:filename:($(git stash list | sed -n -e 's/:.*//p'))"
}
# The completions for git already define a _git-diff completion function, but
# it provides the wrong results when called from _git-forgit because it heavily
# depends on the context it's been called from (usage of $curcontext and
# $CURRENT), so we use a simplified version here which always provides the same
# results independent of the context.
_git-forgit-diff() {
_alternative \
'commit-ranges::__git_commit_ranges' \
'blobs-and-trees-in-treeish::__git_blobs_and_trees_in_treeish' \
'files::__git_changed-in-working-tree_files' \
'blobs::__git_blobs '
}
_git-staged() {
_alternative "files:filename:($(git diff --name-only --staged))"
}
_git-forgit() {
local subcommand cword cmd
subcommand="${words[1]}"
if [[ "$subcommand" != "forgit" ]]; then
# Forgit is obviously called via a git alias. Get the original
# aliased subcommand and proceed as if it was the previous word.
cmd=$(git config --get "alias.$subcommand" | cut -d ' ' -f 2)
cword=$((CURRENT + 1))
else
cword=$CURRENT
cmd=${words[2]}
fi
case ${cword} in
1) ;;
2)
local -a subcommands
subcommands=(
'add:git add selector'
'blame:git blame viewer'
'branch_delete:git branch deletion selector'
'checkout_branch:git checkout branch selector'
'checkout_commit:git checkout commit selector'
'checkout_file:git checkout-file selector'
'checkout_tag:git checkout tag selector'
'cherry_pick:git cherry-picking'
'cherry_pick_from_branch:git cherry-picking with interactive branch selection'
'clean:git clean selector'
'diff:git diff viewer'
'fixup:git fixup'
'ignore:git ignore generator'
'log:git commit viewer'
'rebase:git rebase'
'reset_head:git reset HEAD (unstage) selector'
'revert_commit:git revert commit selector'
'stash_show:git stash viewer'
'stash_push:git stash push selector'
)
_describe -t commands 'git forgit' subcommands
;;
*)
case ${cmd} in
add) _git-add ;;
branch_delete) _git-branches ;;
checkout_branch) _git-branches ;;
checkout_commit) __git_recent_commits ;;
checkout_file) _git-checkout-file ;;
checkout_tag) __git_tags ;;
cherry_pick) _git-cherry-pick ;;
cherry_pick_from_branch) _git-branches ;;
clean) _git-clean ;;
diff) _git-forgit-diff ;;
fixup) __git_branch_names ;;
log) _git-log ;;
rebase) _git-rebase ;;
reset_head) _git-staged ;;
revert_commit) __git_recent_commits ;;
stash_show) _git-stash-show ;;
esac
;;
esac
}

View file

@ -0,0 +1,155 @@
# forgit completions for bash
# When using forgit as a subcommand of git, put this file in one of the
# following places and it will be loaded automatically on tab completion of
# 'git forgit' or any configured git aliases of it:
#
# /usr/share/bash-completion/completions
# ~/.local/share/bash-completion/completions
#
# When using forgit via the shell plugin, source this file explicitly after
# forgit.plugin.zsh to enable tab completion for shell functions and aliases.
_git_branch_delete()
{
__gitcomp_nl "$(__git_heads)"
}
_git_checkout_branch()
{
__gitcomp_nl "$(__git branch -a --format '%(refname:short)')"
}
_git_checkout_file()
{
__gitcomp_nl "$(__git ls-files --modified)"
}
_git_checkout_tag()
{
__gitcomp_nl "$(__git_tags)"
}
_git_stash_show()
{
__gitcomp_nl "$(__git stash list | sed -n -e 's/:.*//p')"
}
# Completion for git-forgit
# This includes git aliases, e.g. "alias.cb=forgit checkout_branch" will
# correctly complete available branches on "git cb".
_git_forgit()
{
local subcommand cword cur prev cmds
subcommand="${COMP_WORDS[1]}"
if [[ "$subcommand" != "forgit" ]]
then
# Forgit is obviously called via a git alias. Get the original
# aliased subcommand and proceed as if it was the previous word.
prev=$(git config --get "alias.$subcommand" | cut -d' ' -f 2)
cword=$((${COMP_CWORD} + 1))
else
cword=${COMP_CWORD}
prev=${COMP_WORDS[COMP_CWORD-1]}
fi
cur=${COMP_WORDS[COMP_CWORD]}
cmds="
add
blame
branch_delete
checkout_branch
checkout_commit
checkout_file
checkout_tag
cherry_pick
cherry_pick_from_branch
clean
diff
fixup
ignore
log
rebase
reset_head
revert_commit
stash_show
stash_push
"
case ${cword} in
2)
COMPREPLY=($(compgen -W "${cmds}" -- ${cur}))
;;
3)
case ${prev} in
add) _git_add ;;
branch_delete) _git_branch_delete ;;
checkout_branch) _git_checkout_branch ;;
checkout_commit) _git_checkout ;;
checkout_file) _git_checkout_file ;;
checkout_tag) _git_checkout_tag ;;
cherry_pick) _git_cherry_pick ;;
cherry_pick_from_branch) _git_checkout_branch ;;
clean) _git_clean ;;
diff) _git_diff ;;
fixup) _git_branch ;;
log) _git_log ;;
rebase) _git_rebase ;;
reset_head) _git_reset ;;
revert_commit) _git_revert ;;
stash_show) _git_stash_show ;;
esac
;;
*)
COMPREPLY=()
;;
esac
}
# Check if forgit plugin is loaded
if [[ $(type -t forgit::add) == function ]]
then
# We're reusing existing git completion functions, so load those first
# and check if completion function exists afterwards.
_completion_loader git
[[ $(type -t __git_complete) == function ]] || return 1
# Completion for forgit plugin shell functions
__git_complete forgit::add _git_add
__git_complete forgit::branch::delete _git_branch_delete
__git_complete forgit::checkout::branch _git_checkout_branch
__git_complete forgit::checkout::commit _git_checkout
__git_complete forgit::checkout::file _git_checkout_file
__git_complete forgit::checkout::tag _git_checkout_tag
__git_complete forgit::cherry::pick _git_cherry_pick
__git_complete forgit::cherry::pick::from::branch _git_checkout_branch
__git_complete forgit::clean _git_clean
__git_complete forgit::diff _git_diff
__git_complete forgit::fixup _git_branch
__git_complete forgit::log _git_log
__git_complete forgit::rebase _git_rebase
__git_complete forgit::reset::head _git_reset
__git_complete forgit::revert::commit _git_revert
__git_complete forgit::stash::show _git_stash_show
# Completion for forgit plugin shell aliases
if [[ -z "$FORGIT_NO_ALIASES" ]]; then
__git_complete "${forgit_add}" _git_add
__git_complete "${forgit_branch_delete}" _git_branch_delete
__git_complete "${forgit_checkout_branch}" _git_checkout_branch
__git_complete "${forgit_checkout_commit}" _git_checkout
__git_complete "${forgit_checkout_file}" _git_checkout_file
__git_complete "${forgit_checkout_tag}" _git_checkout_tag
__git_complete "${forgit_cherry_pick}" _git_checkout_branch
__git_complete "${forgit_clean}" _git_clean
__git_complete "${forgit_diff}" _git_diff
__git_complete "${forgit_fixup}" _git_branch
__git_complete "${forgit_log}" _git_log
__git_complete "${forgit_rebase}" _git_rebase
__git_complete "${forgit_reset_head}" _git_reset
__git_complete "${forgit_revert_commit}" _git_revert
__git_complete "${forgit_stash_show}" _git_stash_show
fi
fi

View file

@ -0,0 +1,34 @@
#!/bin/zsh
#
# forgit completions for zsh plugin
#
# When using forgit via the shell plugin, place completions/_git-forgit in your
# $fpath (e.g. /usr/share/zsh/site-functions) and source this file after
# forgit.plugin.zsh to enable tab completion for shell functions and aliases.
# Check if forgit plugin is loaded
if (( $+functions[forgit::add] )); then
# We're reusing existing completion functions, so load those first
# if not already loaded and check if completion function exists afterwards.
(( $+functions[_git-add] )) || _git
(( $+functions[_git-add] )) || return 1
(( $+functions[_git-branches] )) || _git-forgit
(( $+functions[_git-branches] )) || return 1
# Completions for forgit plugin shell functions (also works for aliases)
compdef _git-add forgit::add
compdef _git-branches forgit::branch::delete
compdef _git-branches forgit::checkout::branch
compdef __git_recent_commits forgit::checkout::commit
compdef _git-checkout-file forgit::checkout::file
compdef __git_tags forgit::checkout::tag
compdef _git-cherry-pick forgit::cherry::pick
compdef _git-branches forgit::cherry::pick::from::branch
compdef _git-clean forgit::clean
compdef _git-forgit-diff forgit::diff
compdef __git_branch_names forgit::fixup
compdef _git-log forgit::log
compdef _git-rebase forgit::rebase
compdef _git-staged forgit::reset::head
compdef __git_recent_commits forgit::revert::commit
compdef _git-stash-show forgit::stash::show
fi

View file

@ -0,0 +1,705 @@
#!/usr/bin/env bash
# MIT (c) Wenxuan Zhang
# This file is meant to be executed directly. If it's available on the PATH,
# it can also be used as a subcommand of git, which then forwards all arguments
# on to forgit. So, all of these commands will work as expected:
#
# `git forgit log`
# `git forgit checkout_file`
# `git forgit checkout_file README.md`
#
# This gives users the choice to set aliases inside of their git config instead
# of their shell config if they prefer.
# Set shell for fzf preview commands
# Disable shellcheck for "which", because it suggests "command -v xxx" instead,
# which is not a working replacement.
# See https://github.com/koalaman/shellcheck/issues/1162
# shellcheck disable=2230
SHELL="$(which bash)"
export SHELL
# Get absolute forgit path
FORGIT=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)/$(basename -- "${BASH_SOURCE[0]}")
FORGIT_FZF_DEFAULT_OPTS="
$FZF_DEFAULT_OPTS
--ansi
--height='80%'
--bind='alt-k:preview-up,alt-p:preview-up'
--bind='alt-j:preview-down,alt-n:preview-down'
--bind='ctrl-r:toggle-all'
--bind='ctrl-s:toggle-sort'
--bind='?:toggle-preview'
--bind='alt-w:toggle-preview-wrap'
--preview-window='right:60%'
+1
$FORGIT_FZF_DEFAULT_OPTS
"
_forgit_warn() { printf "%b[Warn]%b %s\n" '\e[0;33m' '\e[0m' "$@" >&2; }
_forgit_info() { printf "%b[Info]%b %s\n" '\e[0;32m' '\e[0m' "$@" >&2; }
_forgit_inside_work_tree() { git rev-parse --is-inside-work-tree >/dev/null; }
# tac is not available on OSX, tail -r is not available on Linux, so we use either of them
_forgit_reverse_lines() { tac 2> /dev/null || tail -r; }
_forgit_previous_commit() {
# "SHA~" is invalid when the commit is the first commit, but we can use "--root" instead
if [[ "$(git rev-parse "$1")" == "$(git rev-list --max-parents=0 HEAD)" ]]; then
echo "--root"
else
echo "$1~"
fi
}
_forgit_contains_non_flags() {
while (("$#")); do
case "$1" in
-*) shift ;;
*)
return 0
;;
esac
done
return 1
}
# optional render emoji characters (https://github.com/wfxr/emoji-cli)
hash emojify &>/dev/null && _forgit_emojify='|emojify'
# extract the first git sha occurring in the input and strip trailing newline
_forgit_extract_sha="grep -Eo '[a-f0-9]+' | head -1 | tr -d '[:space:]'"
_forgit_pager=${FORGIT_PAGER:-$(git config core.pager || echo 'cat')}
_forgit_show_pager=${FORGIT_SHOW_PAGER:-$(git config pager.show || echo "$_forgit_pager")}
_forgit_diff_pager=${FORGIT_DIFF_PAGER:-$(git config pager.diff || echo "$_forgit_pager")}
_forgit_ignore_pager=${FORGIT_IGNORE_PAGER:-$(hash bat &>/dev/null && echo 'bat -l gitignore --color=always' || echo 'cat')}
_forgit_blame_pager=${FORGIT_BLAME_PAGER:-$(git config pager.blame || echo "$_forgit_pager")}
_forgit_enter_pager=${FORGIT_ENTER_PAGER:-"LESS='-r' less"}
_forgit_log_format=${FORGIT_LOG_FORMAT:-%C(auto)%h%d %s %C(black)%C(bold)%cr%Creset}
_forgit_log_preview_options="--graph --pretty=format:'$_forgit_log_format' --color=always --abbrev-commit --date=relative"
_forgit_fullscreen_context=${FORGIT_FULLSCREEN_CONTEXT:-10}
_forgit_preview_context=${FORGIT_PREVIEW_CONTEXT:-3}
_forgit_is_file_tracked="(git ls-files {} --error-unmatch) &> /dev/null"
# git commit viewer
_forgit_log() {
_forgit_inside_work_tree || return 1
local opts graph files log_format preview_cmd enter_cmd
files=$(sed -nE 's/.*-- (.*)/\1/p' <<< "$*") # extract files parameters for `git show` command
preview_cmd="echo {} | $_forgit_extract_sha | xargs -I% git show --color=always -U$_forgit_preview_context % -- $files | $_forgit_show_pager"
enter_cmd="echo {} | $_forgit_extract_sha | xargs -I% ${FORGIT} diff %^! $files"
opts="
$FORGIT_FZF_DEFAULT_OPTS
+s +m --tiebreak=index
--bind=\"enter:execute($enter_cmd)\"
--bind=\"ctrl-y:execute-silent(echo {} | $_forgit_extract_sha | ${FORGIT_COPY_CMD:-pbcopy})\"
--preview=\"$preview_cmd\"
$FORGIT_LOG_FZF_OPTS
"
graph=--graph
[[ $FORGIT_LOG_GRAPH_ENABLE == false ]] && graph=
log_format=${FORGIT_GLO_FORMAT:-$_forgit_log_format}
eval "git log $graph --color=always --format='$log_format' $FORGIT_LOG_GIT_OPTS $* $_forgit_emojify" |
FZF_DEFAULT_OPTS="$opts" fzf
fzf_exit_code=$?
# exit successfully on 130 (ctrl-c/esc)
[[ $fzf_exit_code == 130 ]] && return 0
return $fzf_exit_code
}
# git diff viewer
_forgit_diff() {
_forgit_inside_work_tree || return 1
local files opts commits repo get_files preview_cmd enter_cmd
[[ $# -ne 0 ]] && {
if git rev-parse "$1" -- &>/dev/null ; then
if [[ $# -gt 1 ]] && git rev-parse "$2" -- &>/dev/null; then
commits="$1 $2" && files=("${@:3}")
else
commits="$1" && files=("${@:2}")
fi
else
files=("$@")
fi
}
repo="$(git rev-parse --show-toplevel)"
# Construct a null-terminated list of the filenames
# The input looks like one of these lines:
# [R100] file -> another file
# [A] file with spaces
# [D] oldfile
# And we transform it to this representation for further usage with "xargs -0":
# file\0another file\0
# file with spaces\0
# oldfile\0
# We have to do a two-step sed -> tr pipe because OSX's sed implementation does
# not support the null-character directly.
get_files="echo {} | sed 's/.*] *//' | sed 's/ -> /\\\n/' | tr '\\\n' '\\\0'"
# Git stashes are named "stash@{x}", which contains the fzf placeholder "{x}".
# In order to support passing stashes as arguments to _forgit_diff, we have to
# prevent fzf from interpreting this substring by escaping the opening bracket.
# The string is evaluated a few subsequent times, so we need multiple escapes.
escaped_commits=${commits//\{/\\\\\{}
git_diff="git diff --color=always $FORGIT_DIFF_GIT_OPTS $escaped_commits"
preview_cmd="cd '$repo' && $get_files | xargs -0 $git_diff -U$_forgit_preview_context -- | $_forgit_diff_pager"
enter_cmd="cd '$repo' && $get_files | xargs -0 $git_diff -U$_forgit_fullscreen_context -- | $_forgit_diff_pager"
opts="
$FORGIT_FZF_DEFAULT_OPTS
+m -0 --bind=\"enter:execute($enter_cmd | $_forgit_enter_pager)\"
--preview=\"$preview_cmd\"
--bind=\"alt-e:execute-silent($EDITOR \$\($get_files\) >/dev/tty </dev/tty)+refresh-preview\"
$FORGIT_DIFF_FZF_OPTS
--prompt=\"$commits > \"
"
eval "git diff --name-status $FORGIT_DIFF_GIT_OPTS $commits -- ${files[*]} | sed -E 's/^([[:alnum:]]+)[[:space:]]+(.*)$/[\1] \2/'" |
sed 's/ / -> /2' | expand -t 8 |
FZF_DEFAULT_OPTS="$opts" fzf
fzf_exit_code=$?
# exit successfully on 130 (ctrl-c/esc)
[[ $fzf_exit_code == 130 ]] && return 0
return $fzf_exit_code
}
# git add selector
_forgit_add() {
_forgit_inside_work_tree || return 1
local git_add changed unmerged untracked files opts preview extract
git_add="git add $FORGIT_ADD_GIT_OPTS"
# Add files if passed as arguments
[[ $# -ne 0 ]] && { $git_add "$@" && git status -su; return $?; }
changed=$(git config --get-color color.status.changed red)
unmerged=$(git config --get-color color.status.unmerged red)
untracked=$(git config --get-color color.status.untracked red)
# NOTE: paths listed by 'git status -su' mixed with quoted and unquoted style
# remove indicators | remove original path for rename case | remove surrounding quotes
extract="
sed 's/^.*] //' |
sed 's/.* -> //' |
sed -e 's/^\\\"//' -e 's/\\\"\$//'"
preview="
file=\$(echo {} | $extract)
if (git status -s -- \\\"\$file\\\" | grep '^??') &>/dev/null; then # diff with /dev/null for untracked files
git diff --color=always --no-index -- /dev/null \\\"\$file\\\" | $_forgit_diff_pager | sed '2 s/added:/untracked:/'
else
git diff --color=always -- \\\"\$file\\\" | $_forgit_diff_pager
fi"
opts="
$FORGIT_FZF_DEFAULT_OPTS
-0 -m --nth 2..,..
--preview=\"$preview\"
--bind=\"alt-e:execute-silent($EDITOR \$\(echo {} | $extract\) >/dev/tty </dev/tty)+refresh-preview\"
$FORGIT_ADD_FZF_OPTS
"
files=$(git -c color.status=always -c status.relativePaths=true status -su |
grep -F -e "$changed" -e "$unmerged" -e "$untracked" |
sed -E 's/^(..[^[:space:]]*)[[:space:]]+(.*)$/[\1] \2/' |
FZF_DEFAULT_OPTS="$opts" fzf |
sh -c "$extract")
[[ -n "$files" ]] && echo "$files"| tr '\n' '\0' | $git_add --pathspec-file-nul --pathspec-from-file - && git status -su && return
echo 'Nothing to add.'
}
# git reset HEAD (unstage) selector
_forgit_reset_head() {
_forgit_inside_work_tree || return 1
local git_reset_head cmd files opts rootdir
git_reset_head="git reset -q $FORGIT_RESET_HEAD_GIT_OPTS HEAD"
[[ $# -ne 0 ]] && { $git_reset_head "$@" && git status --short; return $?; }
rootdir=$(git rev-parse --show-toplevel)
cmd="git diff --staged --color=always -- $rootdir/{} | $_forgit_diff_pager "
opts="
$FORGIT_FZF_DEFAULT_OPTS
-m -0
--preview=\"$cmd\"
$FORGIT_RESET_HEAD_FZF_OPTS
"
files="$(git diff --staged --name-only | FZF_DEFAULT_OPTS="$opts" fzf)"
# shellcheck disable=2086
[[ -n "$files" ]] && echo "$files" | tr '\n' '\0' | xargs -0 -I% $git_reset_head "$rootdir"/% && git status --short && return
echo 'Nothing to unstage.'
}
# git stash viewer
_forgit_stash_show() {
_forgit_inside_work_tree || return 1
local git_stash_show git_stash_list cmd opts
git_stash_show="git stash show --color=always --ext-diff"
[[ $# -ne 0 ]] && { $git_stash_show "$@"; return $?; }
git_stash_list="git stash list $FORGIT_STASH_SHOW_GIT_OPTS"
cmd="echo {} |cut -d: -f1 |xargs -I% $git_stash_show % |$_forgit_diff_pager"
opts="
$FORGIT_FZF_DEFAULT_OPTS
+s +m -0 --tiebreak=index --bind=\"enter:execute($cmd | $_forgit_enter_pager)\"
--bind=\"ctrl-y:execute-silent(echo {} | cut -d: -f1 | tr -d '[:space:]' | ${FORGIT_COPY_CMD:-pbcopy})\"
--preview=\"$cmd\"
$FORGIT_STASH_FZF_OPTS
"
$git_stash_list | FZF_DEFAULT_OPTS="$opts" fzf
fzf_exit_code=$?
# exit successfully on 130 (ctrl-c/esc)
[[ $fzf_exit_code == 130 ]] && return 0
return $fzf_exit_code
}
# git stash push selector
_forgit_stash_push() {
_forgit_inside_work_tree || return 1
local git_stash_push msg args
git_stash_push="git stash push $FORGIT_STASH_PUSH_GIT_OPTS"
args=( "$@" )
while (( "$#" )); do
case "$1" in
# allow message as argument
-m|--message)
msg="$2"
shift 2
;;
# ignore -u as it's used implicitly
-u|--include-untracked) shift ;;
# pass to git directly when encountering anything else
*) $git_stash_push "${args[@]}"; return $?
esac
done
local opts preview files
opts="
$FORGIT_FZF_DEFAULT_OPTS
-m
$FORGIT_STASH_PUSH_FZF_OPTS
"
preview="
if $_forgit_is_file_tracked; then
git diff --color=always {} | $_forgit_diff_pager
else
git diff --color=always /dev/null {} | $_forgit_diff_pager
fi
"
# Show both modified and untracked files
files=$(git ls-files --exclude-standard --modified --others | FZF_DEFAULT_OPTS="$opts" fzf --preview="$preview")
[[ -z "$files" ]] && return 1
echo "${files[@]}" | tr '\n' '\0' | $git_stash_push ${msg:+-m "$msg"} -u --pathspec-file-nul --pathspec-from-file -
}
# git clean selector
_forgit_clean() {
_forgit_inside_work_tree || return 1
_forgit_contains_non_flags "$@" && { git clean -q "$@"; return $?; }
local git_clean files opts
git_clean="git clean $FORGIT_CLEAN_GIT_OPTS"
opts="
$FORGIT_FZF_DEFAULT_OPTS
-m -0
$FORGIT_CLEAN_FZF_OPTS
"
# Note: Postfix '/' in directory path should be removed. Otherwise the directory itself will not be removed.
files=$(git clean -xdffn "$@"| sed 's/^Would remove //' | FZF_DEFAULT_OPTS="$opts" fzf |sed 's#/$##')
# shellcheck disable=2086
[[ -n "$files" ]] && echo "$files" | tr '\n' '\0' | xargs -0 -I% $git_clean -xdff '%' && git status --short && return
echo 'Nothing to clean.'
}
_forgit_cherry_pick() {
local git_cherry_pick base target preview opts fzf_selection fzf_exitval
git_cherry_pick="git cherry-pick $FORGIT_CHERRY_PICK_GIT_OPTS"
base=$(git branch --show-current)
[[ -z "$base" ]] && echo "Current commit is not on a branch." && return 1
[[ -z $1 ]] && echo "Please specify target branch" && return 1
target="$1"
# in this function, we do something interesting to maintain proper ordering as it's assumed
# you generally want to cherry pick oldest->newest when you multiselect
# The instances of "cut", "nl" and "sort" all serve this purpose
# Please see https://github.com/wfxr/forgit/issues/253 for more details
preview="echo {} | cut -f2- | $_forgit_extract_sha | xargs -I% git show --color=always % | $_forgit_show_pager"
opts="
$FORGIT_FZF_DEFAULT_OPTS
--preview=\"$preview\"
--multi --ansi --with-nth 2.. -0 --tiebreak=index
$FORGIT_CHERRY_PICK_FZF_OPTS
"
# Note: do not add any pipe after the fzf call here, otherwise the fzf_exitval is not propagated properly.
# Any eventual post processing can be done afterwards when the "commits" variable is assigned below.
fzf_selection=$(git log --right-only --color=always --cherry-pick --oneline "$base"..."$target" | nl |
FZF_DEFAULT_OPTS="$opts" fzf)
fzf_exitval=$?
[[ $fzf_exitval != 0 ]] && return $fzf_exitval
[[ -z "$fzf_selection" ]] && return $fzf_exitval
${IFS+"false"} && unset old_IFS || old_IFS="$IFS"
IFS=$'\n'
# shellcheck disable=2207
commits=($(echo "$fzf_selection" | sort --numeric-sort --key=1 | cut -f2 | cut -d' ' -f1 | _forgit_reverse_lines))
${old_IFS+"false"} && unset IFS || IFS="$old_IFS"
[ ${#commits[@]} -eq 0 ] && return 1
$git_cherry_pick "${commits[@]}"
}
_forgit_cherry_pick_from_branch() {
_forgit_inside_work_tree || return 1
local cmd preview opts branch exitval input_branch args base
base=$(git branch --show-current)
[[ -z "$base" ]] && echo "Current commit is not on a branch." && return 1
args=("$@")
if [[ $# -ne 0 ]]; then
input_branch=${args[0]}
fi
cmd="git branch --color=always --all | LC_ALL=C sort -k1.1,1.1 -rs"
preview="git log --right-only --color=always --cherry-pick --oneline $base...{1}"
opts="
$FORGIT_FZF_DEFAULT_OPTS
+s +m --tiebreak=index --header-lines=1
--preview=\"$preview\"
$FORGIT_CHERRY_PICK_FROM_BRANCH_FZF_OPTS
"
# loop until either the branch selector is closed or a commit to be cherry
# picked has been selected from within a branch
while true
do
if [[ -z $input_branch ]]; then
branch="$(eval "$cmd" | FZF_DEFAULT_OPTS="$opts" fzf | awk '{print $1}')"
else
branch=$input_branch
fi
unset input_branch
[[ -z "$branch" ]] && return 1
_forgit_cherry_pick "$branch"
exitval=$?
[[ $exitval != 130 ]] || [[ $# -ne 0 ]] && return $exitval
done
}
_forgit_rebase() {
_forgit_inside_work_tree || return 1
local git_rebase cmd preview opts graph files target_commit prev_commit
git_rebase="git rebase -i $FORGIT_REBASE_GIT_OPTS"
graph=--graph
[[ $FORGIT_LOG_GRAPH_ENABLE == false ]] && graph=
cmd="git log $graph --color=always --format='$_forgit_log_format' $* $_forgit_emojify"
files=$(sed -nE 's/.* -- (.*)/\1/p' <<< "$*") # extract files parameters for `git show` command
preview="echo {} | $_forgit_extract_sha | xargs -I% git show --color=always % -- $files | $_forgit_show_pager"
opts="
$FORGIT_FZF_DEFAULT_OPTS
+s +m --tiebreak=index
--bind=\"ctrl-y:execute-silent(echo {} | $_forgit_extract_sha | ${FORGIT_COPY_CMD:-pbcopy})\"
--preview=\"$preview\"
$FORGIT_REBASE_FZF_OPTS
"
target_commit=$(eval "$cmd" | FZF_DEFAULT_OPTS="$opts" fzf | eval "$_forgit_extract_sha")
if [[ -n "$target_commit" ]]; then
prev_commit=$(_forgit_previous_commit "$target_commit")
$git_rebase "$prev_commit"
fi
}
_forgit_fixup() {
_forgit_inside_work_tree || return 1
git diff --cached --quiet && echo 'Nothing to fixup: there are no staged changes.' && return 1
local git_fixup cmd preview opts graph files target_commit prev_commit
git_fixup="git commit --fixup $FORGIT_FIXUP_GIT_OPTS"
graph=--graph
[[ $FORGIT_LOG_GRAPH_ENABLE == false ]] && graph=
cmd="git log $graph --color=always --format='$_forgit_log_format' $* $_forgit_emojify"
files=$(sed -nE 's/.* -- (.*)/\1/p' <<< "$*")
preview="echo {} | $_forgit_extract_sha | xargs -I% git show --color=always % -- $files | $_forgit_show_pager"
opts="
$FORGIT_FZF_DEFAULT_OPTS
+s +m --tiebreak=index
--bind=\"ctrl-y:execute-silent(echo {} | $_forgit_extract_sha | ${FORGIT_COPY_CMD:-pbcopy})\"
--preview=\"$preview\"
$FORGIT_FIXUP_FZF_OPTS
"
target_commit=$(eval "$cmd" | FZF_DEFAULT_OPTS="$opts" fzf | eval "$_forgit_extract_sha")
if [[ -n "$target_commit" ]] && $git_fixup "$target_commit"; then
prev_commit=$(_forgit_previous_commit "$target_commit")
# rebase will fail if there are unstaged changes so --autostash is needed to temporarily stash them
# GIT_SEQUENCE_EDITOR=: is needed to skip the editor
GIT_SEQUENCE_EDITOR=: git rebase --autostash -i --autosquash "$prev_commit"
fi
}
# git checkout-file selector
_forgit_checkout_file() {
_forgit_inside_work_tree || return 1
local git_checkout cmd files opts
git_checkout="git checkout $FORGIT_CHECKOUT_FILE_GIT_OPTS"
[[ $# -ne 0 ]] && { $git_checkout -- "$@"; return $?; }
cmd="git diff --color=always -- {} | $_forgit_diff_pager"
opts="
$FORGIT_FZF_DEFAULT_OPTS
-m -0
--preview=\"$cmd\"
$FORGIT_CHECKOUT_FILE_FZF_OPTS
"
files="$(git ls-files --modified "$(git rev-parse --show-toplevel)"| FZF_DEFAULT_OPTS="$opts" fzf)"
[[ -n "$files" ]] && echo "$files" | tr '\n' '\0' | $git_checkout --pathspec-file-nul --pathspec-from-file -
}
# git checkout-branch selector
_forgit_checkout_branch() {
_forgit_inside_work_tree || return 1
# if called with arguments, check if branch exists, else create a new one
if [[ $# -ne 0 ]]; then
if [[ "$*" == "-" ]] || git show-branch "$@" &>/dev/null; then
git switch "$@"
else
git switch -c "$@"
fi
checkout_status=$?
git status --short
return $checkout_status
fi
local git_checkout cmd preview opts branch
cmd="git branch --color=always ${FORGIT_CHECKOUT_BRANCH_BRANCH_GIT_OPTS:---all} | LC_ALL=C sort -k1.1,1.1 -rs"
preview="git log {1} $_forgit_log_preview_options"
opts="
$FORGIT_FZF_DEFAULT_OPTS
+s +m --tiebreak=index --header-lines=1
--preview=\"$preview\"
$FORGIT_CHECKOUT_BRANCH_FZF_OPTS
"
branch="$(eval "$cmd" | FZF_DEFAULT_OPTS="$opts" fzf | awk '{print $1}')"
[[ -z "$branch" ]] && return 1
git_checkout="git checkout $FORGIT_CHECKOUT_BRANCH_GIT_OPTS"
# track the remote branch if possible
if [[ "$branch" == "remotes/origin/"* ]]; then
if git branch | grep -qw "${branch#remotes/origin/}"; then
# hack to force creating a new branch which tracks the remote if a local branch already exists
$git_checkout -b "track/${branch#remotes/origin/}" --track "$branch"
elif ! $git_checkout --track "$branch" 2>/dev/null; then
$git_checkout "$branch"
fi
else
$git_checkout "$branch"
fi
}
# git checkout-tag selector
_forgit_checkout_tag() {
_forgit_inside_work_tree || return 1
local git_checkout cmd opts preview
git_checkout="git checkout $FORGIT_CHECKOUT_TAG_GIT_OPTS"
[[ $# -ne 0 ]] && { $git_checkout "$@"; return $?; }
cmd="git tag -l --sort=-v:refname"
preview="git log {1} $_forgit_log_preview_options"
opts="
$FORGIT_FZF_DEFAULT_OPTS
+s +m --tiebreak=index
--preview=\"$preview\"
$FORGIT_CHECKOUT_TAG_FZF_OPTS
"
tag="$(eval "$cmd" | FZF_DEFAULT_OPTS="$opts" fzf)"
[[ -z "$tag" ]] && return 1
$git_checkout "$tag"
}
# git checkout-commit selector
_forgit_checkout_commit() {
_forgit_inside_work_tree || return 1
local git_checkout cmd opts graph
git_checkout="git checkout $FORGIT_CHECKOUT_COMMIT_GIT_OPTS"
[[ $# -ne 0 ]] && { $git_checkout "$@"; return $?; }
cmd="echo {} | $_forgit_extract_sha |xargs -I% git show --color=always % | $_forgit_show_pager"
opts="
$FORGIT_FZF_DEFAULT_OPTS
+s +m --tiebreak=index
--bind=\"ctrl-y:execute-silent(echo {} | $_forgit_extract_sha | ${FORGIT_COPY_CMD:-pbcopy})\"
--preview=\"$cmd\"
$FORGIT_CHECKOUT_COMMIT_FZF_OPTS
"
graph=--graph
[[ $FORGIT_LOG_GRAPH_ENABLE == false ]] && graph=
# shellcheck disable=2086
eval "git log $graph --color=always --format='$_forgit_log_format' $_forgit_emojify" |
FZF_DEFAULT_OPTS="$opts" fzf | eval "$_forgit_extract_sha" | xargs -I% $git_checkout % --
}
_forgit_branch_delete() {
_forgit_inside_work_tree || return 1
local git_branch preview opts cmd branches
git_branch="git branch $FORGIT_BRANCH_DELETE_GIT_OPTS"
[[ $# -ne 0 ]] && { $git_branch -D "$@"; return $?; }
preview="git log {1} $_forgit_log_preview_options"
opts="
$FORGIT_FZF_DEFAULT_OPTS
+s --multi --tiebreak=index --header-lines=1
--preview=\"$preview\"
$FORGIT_BRANCH_DELETE_FZF_OPTS
"
cmd="git branch --color=always | LC_ALL=C sort -k1.1,1.1 -rs"
branches=$(eval "$cmd" | FZF_DEFAULT_OPTS="$opts" fzf | awk '{print $1}')
# shellcheck disable=2086
echo -n "$branches" | tr '\n' '\0' | xargs -I{} -0 $git_branch -D {}
}
# git revert-commit selector
_forgit_revert_commit() {
_forgit_inside_work_tree || return 1
local git_revert cmd opts files preview commits IFS
git_revert="git revert $FORGIT_REVERT_COMMIT_GIT_OPTS"
[[ $# -ne 0 ]] && { $git_revert "$@"; return $?; }
cmd="git log --graph --color=always --format='$_forgit_log_format' $* $_forgit_emojify"
opts="
$FORGIT_FZF_DEFAULT_OPTS
+s --tiebreak=index
--ansi --with-nth 2..
$FORGIT_REVERT_COMMIT_FZF_OPTS
"
# in this function, we do something interesting to maintain proper ordering as it's assumed
# you generally want to revert newest->oldest when you multiselect
# The instances of "cut", "nl" and "sort" all serve this purpose
# Please see https://github.com/wfxr/forgit/issues/253 for more details
files=$(sed -nE 's/.* -- (.*)/\1/p' <<< "$*") # extract files parameters for `git show` command
preview="echo {} | cut -f2- | $_forgit_extract_sha | xargs -I% git show --color=always % -- $files | $_forgit_show_pager"
${IFS+"false"} && unset old_IFS || old_IFS="$IFS"
IFS=$'\n'
# shellcheck disable=2207
commits=($(eval "$cmd" |
nl |
FZF_DEFAULT_OPTS="$opts" fzf --preview="$preview" -m |
sort --numeric-sort --key=1 |
cut -f2- |
sed 's/^[^a-f^0-9]*\([a-f0-9]*\).*/\1/'))
${old_IFS+"false"} && unset IFS || IFS="$old_IFS"
[ ${#commits[@]} -eq 0 ] && return 1
$git_revert "${commits[@]}"
}
# git blame viewer
_forgit_blame() {
_forgit_inside_work_tree || return 1
local git_blame opts flags preview file
git_blame="git blame $FORGIT_BLAME_GIT_OPTS"
_forgit_contains_non_flags "$@" && { $git_blame "$@"; return $?; }
opts="
$FORGIT_FZF_DEFAULT_OPTS
$FORGIT_BLAME_FZF_OPTS
"
flags=$(git rev-parse --flags "$@")
preview="
if $_forgit_is_file_tracked; then
git blame {} --date=short $FORGIT_BLAME_GIT_OPTS $flags | $_forgit_blame_pager
else
echo File not tracked
fi
"
file=$(FZF_DEFAULT_OPTS="$opts" fzf --preview="$preview")
[[ -z "$file" ]] && return 1
# shellcheck disable=2086
eval $git_blame "$file" "$flags"
}
# git ignore generator
export FORGIT_GI_REPO_REMOTE=${FORGIT_GI_REPO_REMOTE:-https://github.com/dvcs/gitignore}
export FORGIT_GI_REPO_LOCAL="${FORGIT_GI_REPO_LOCAL:-${XDG_CACHE_HOME:-$HOME/.cache}/forgit/gi/repos/dvcs/gitignore}"
export FORGIT_GI_TEMPLATES=${FORGIT_GI_TEMPLATES:-$FORGIT_GI_REPO_LOCAL/templates}
_forgit_ignore() {
[ -d "$FORGIT_GI_REPO_LOCAL" ] || _forgit_ignore_update
local IFS cmd args opts
cmd="$_forgit_ignore_pager $FORGIT_GI_TEMPLATES/{2}{,.gitignore} 2>/dev/null"
opts="
$FORGIT_FZF_DEFAULT_OPTS
-m --preview-window='right:70%'
--preview=\"eval $cmd\"
$FORGIT_IGNORE_FZF_OPTS
"
${IFS+"false"} && unset old_IFS || old_IFS="$IFS"
IFS=$'\n'
# shellcheck disable=SC2206,2207
args=($@) && [[ $# -eq 0 ]] && args=($(_forgit_ignore_list | nl -nrn -w4 -s' ' |
FZF_DEFAULT_OPTS="$opts" fzf | awk '{print $2}'))
${old_IFS+"false"} && unset IFS || IFS="$old_IFS"
[ ${#args[@]} -eq 0 ] && return 1
# shellcheck disable=SC2068
_forgit_ignore_get ${args[@]}
}
_forgit_ignore_update() {
if [[ -d "$FORGIT_GI_REPO_LOCAL" ]]; then
_forgit_info 'Updating gitignore repo...'
(cd "$FORGIT_GI_REPO_LOCAL" && git pull --no-rebase --ff) || return 1
else
_forgit_info 'Initializing gitignore repo...'
git clone --depth=1 "$FORGIT_GI_REPO_REMOTE" "$FORGIT_GI_REPO_LOCAL"
fi
}
_forgit_ignore_get() {
local item filename header
for item in "$@"; do
if filename=$(find -L "$FORGIT_GI_TEMPLATES" -type f \( -iname "${item}.gitignore" -o -iname "${item}" \) -print -quit); then
[[ -z "$filename" ]] && _forgit_warn "No gitignore template found for '$item'." && continue
header="${filename##*/}" && header="${header%.gitignore}"
echo "### $header" && cat "$filename" && echo
fi
done
}
_forgit_ignore_list() {
find "$FORGIT_GI_TEMPLATES" -print |sed -e 's#.gitignore$##' -e 's#.*/##' | sort -fu
}
_forgit_ignore_clean() {
setopt localoptions rmstarsilent
[[ -d "$FORGIT_GI_REPO_LOCAL" ]] && rm -rf "$FORGIT_GI_REPO_LOCAL"
}
valid_commands=(
"add"
"blame"
"branch_delete"
"checkout_branch"
"checkout_commit"
"checkout_file"
"checkout_tag"
"cherry_pick"
"cherry_pick_from_branch"
"clean"
"diff"
"fixup"
"ignore"
"log"
"rebase"
"reset_head"
"revert_commit"
"stash_show"
"stash_push"
)
cmd="$1"
shift
# shellcheck disable=SC2076
if [[ ! " ${valid_commands[*]} " =~ " ${cmd} " ]]; then
if [[ -z "$cmd" ]]; then
printf "forgit: missing command\n\n"
else
printf "forgit: '%s' is not a valid forgit command.\n\n" "$cmd"
fi
printf "The following commands are supported:\n"
printf "\t%s\n" "${valid_commands[@]}"
exit 1
fi
_forgit_"${cmd}" "$@"

View file

@ -0,0 +1,232 @@
# MIT (c) Chris Apple
set INSTALL_DIR (dirname (dirname (status -f)))
set -x FORGIT_INSTALL_DIR "$INSTALL_DIR/conf.d"
set -x FORGIT "$FORGIT_INSTALL_DIR/bin/git-forgit"
if [ ! -e "$FORGIT" ]
set -x FORGIT_INSTALL_DIR "$INSTALL_DIR/vendor_conf.d"
set -x FORGIT "$FORGIT_INSTALL_DIR/bin/git-forgit"
end
function forgit::warn
printf "%b[Warn]%b %s\n" '\e[0;33m' '\e[0m' "$argv" >&2
end
# backwards compatibility:
# export all user-defined FORGIT variables to make them available in git-forgit
set unexported_vars 0
set | awk -F ' ' '{ print $1 }' | grep FORGIT_ | while read var
if not set -x | grep -q "^$var\b"
if test $unexported_vars = 0
forgit::warn "Config options have to be exported in future versions of forgit."
forgit::warn "Please update your config accordingly:"
end
forgit::warn " set -x $var \"$$var\""
set unexported_vars (math $unexported_vars + 1)
set -x $var $$var
end
end
function forgit::log -d "git commit viewer"
"$FORGIT" log $argv
end
function forgit::diff -d "git diff viewer" --argument-names arg1 arg2
"$FORGIT" diff $argv
end
function forgit::add -d "git add selector" --wraps "git add"
"$FORGIT" add $argv
end
function forgit::reset::head -d "git reset HEAD (unstage) selector"
"$FORGIT" reset_head $argv
end
function forgit::stash::show -d "git stash viewer"
"$FORGIT" stash_show $argv
end
function forgit::stash::push -d "git stash push selector" ()
"$FORGIT" stash_push $argv
end
function forgit::clean -d "git clean selector"
"$FORGIT" clean $argv
end
function forgit::cherry::pick -d "git cherry-picking" --argument-names 'target' --wraps "git cherry-pick"
"$FORGIT" cherry_pick $argv
end
function forgit::cherry::pick::from::branch -d "git cherry-picking with interactive branch selection" --wraps "git cherry-pick"
"$FORGIT" cherry_pick_from_branch $argv
end
function forgit::rebase -d "git rebase"
"$FORGIT" rebase $argv
end
function forgit::fixup -d "git fixup"
"$FORGIT" fixup $argv
end
function forgit::checkout::file -d "git checkout-file selector" --argument-names 'file_name' --wraps "git checkout --"
"$FORGIT" checkout_file $argv
end
function forgit::checkout::branch -d "git checkout branch selector" --argument-names 'input_branch_name' --wraps "git branch"
"$FORGIT" checkout_branch $argv
end
function forgit::checkout::tag -d "git checkout tag selector" --argument-names 'tag_name' --wraps "git checkout"
"$FORGIT" checkout_tag $argv
end
function forgit::checkout::commit -d "git checkout commit selector" --argument-names 'commit_id' --wraps "git checkout"
"$FORGIT" checkout_commit $argv
end
function forgit::branch::delete -d "git branch deletion selector" --wraps "git branch --delete"
"$FORGIT" branch_delete $argv
end
function forgit::revert::commit -d "git revert commit selector" --argument-names 'commit_hash' --wraps "git revert --"
"$FORGIT" revert_commit $argv
end
function forgit::blame -d "git blame viewer"
"$FORGIT" blame $argv
end
function forgit::ignore -d "git ignore generator"
"$FORGIT" ignore $argv
end
function forgit::ignore::update
"$FORGIT" ignore_update $argv
end
function forgit::ignore::get
"$FORGIT" ignore_get $argv
end
function forgit::ignore::list
"$FORGIT" ignore_list $argv
end
function forgit::ignore::clean
"$FORGIT" ignore_clean $argv
end
# register aliases
if test -z "$FORGIT_NO_ALIASES"
if test -n "$forgit_add"
alias $forgit_add 'forgit::add'
else
alias ga 'forgit::add'
end
if test -n "$forgit_reset_head"
alias $forgit_reset_head 'forgit::reset::head'
else
alias grh 'forgit::reset::head'
end
if test -n "$forgit_log"
alias $forgit_log 'forgit::log'
else
alias glo 'forgit::log'
end
if test -n "$forgit_diff"
alias $forgit_diff 'forgit::diff'
else
alias gd 'forgit::diff'
end
if test -n "$forgit_ignore"
alias $forgit_ignore 'forgit::ignore'
else
alias gi 'forgit::ignore'
end
if test -n "$forgit_checkout_file"
alias $forgit_checkout_file 'forgit::checkout::file'
else
alias gcf 'forgit::checkout::file'
end
if test -n "$forgit_checkout_branch"
alias $forgit_checkout_branch 'forgit::checkout::branch'
else
alias gcb 'forgit::checkout::branch'
end
if test -n "$forgit_branch_delete"
alias $forgit_branch_delete 'forgit::branch::delete'
else
alias gbd 'forgit::branch::delete'
end
if test -n "$forgit_clean"
alias $forgit_clean 'forgit::clean'
else
alias gclean 'forgit::clean'
end
if test -n "$forgit_stash_show"
alias $forgit_stash_show 'forgit::stash::show'
else
alias gss 'forgit::stash::show'
end
if test -n "$forgit_stash_push"
alias $forgit_stash_push 'forgit::stash::push'
else
alias gsp 'forgit::stash::push'
end
if test -n "$forgit_cherry_pick"
alias $forgit_cherry_pick 'forgit::cherry::pick::from::branch'
else
alias gcp 'forgit::cherry::pick::from::branch'
end
if test -n "$forgit_rebase"
alias $forgit_rebase 'forgit::rebase'
else
alias grb 'forgit::rebase'
end
if test -n "$forgit_fixup"
alias $forgit_fixup 'forgit::fixup'
else
alias gfu 'forgit::fixup'
end
if test -n "$forgit_checkout_commit"
alias $forgit_checkout_commit 'forgit::checkout::commit'
else
alias gco 'forgit::checkout::commit'
end
if test -n "$forgit_revert_commit"
alias $forgit_revert_commit 'forgit::revert::commit'
else
alias grc 'forgit::revert::commit'
end
if test -n "$forgit_blame"
alias $forgit_blame 'forgit::blame'
else
alias gbl 'forgit::blame'
end
if test -n "$forgit_checkout_tag"
alias $forgit_checkout_tag 'forgit::checkout::tag'
else
alias gct 'forgit::checkout::tag'
end
end

View file

@ -3,7 +3,6 @@ set -xg VISUAL nvim
set -xg XDG_CONFIG_HOME ~/.config
set -xg XDG_CACHE_HOME ~/.cache
set -xg XDG_DATA_HOME ~/.local/share
set -xg XDG_RUNTIME_DIR ~/.local/run
set -xg XDG_BIN_HOME ~/.local/bin
set -xg XDG_SCRIPT_HOME ~/.local/script
set -xg LANG es_ES.UTF-8
@ -16,6 +15,7 @@ if status is-interactive
--color=fg:#cad3f5,header:#ed8796,info:#c6a0f6,pointer:#f4dbd6 \
--color=marker:#f4dbd6,fg+:#cad3f5,prompt:#c6a0f6,hl+:#ed8796"
set -xg LS_COLORS (vivid generate catppuccin-macchiato)
set -xg BAT_THEME Catppuccin-macchiato
set fzf_preview_dir_cmd exa --all --color=always
fzf_configure_bindings --directory=\cf

View file

@ -2,3 +2,4 @@ franciscolourenco/done
acomagu/fish-async-prompt
joehillen/to-fish
patrickf1/fzf.fish
wfxr/forgit

View file

@ -7,8 +7,9 @@ SETUVAR _fisher_acomagu_2F_fish_2D_async_2D_prompt_files:\x7e/\x2econfig/fish/co
SETUVAR _fisher_franciscolourenco_2F_done_files:\x7e/\x2econfig/fish/conf\x2ed/done\x2efish
SETUVAR _fisher_joehillen_2F_to_2D_fish_files:\x7e/\x2econfig/fish/functions/to\x2efish\x1e\x7e/\x2econfig/fish/conf\x2ed/to\x2efish\x1e\x7e/\x2econfig/fish/completions/to\x2efish
SETUVAR _fisher_patrickf1_2F_fzf_2E_fish_files:\x7e/\x2econfig/fish/functions/_fzf_configure_bindings_help\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_extract_var_info\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_preview_changed_file\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_preview_file\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_report_diff_type\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_report_file_type\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_search_directory\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_search_git_log\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_search_git_status\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_search_history\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_search_processes\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_search_variables\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_wrapper\x2efish\x1e\x7e/\x2econfig/fish/functions/fzf_configure_bindings\x2efish\x1e\x7e/\x2econfig/fish/conf\x2ed/fzf\x2efish\x1e\x7e/\x2econfig/fish/completions/fzf_configure_bindings\x2efish
SETUVAR _fisher_plugins:franciscolourenco/done\x1eacomagu/fish\x2dasync\x2dprompt\x1ejoehillen/to\x2dfish\x1epatrickf1/fzf\x2efish
SETUVAR _fisher_plugins:franciscolourenco/done\x1eacomagu/fish\x2dasync\x2dprompt\x1ejoehillen/to\x2dfish\x1epatrickf1/fzf\x2efish\x1ewfxr/forgit
SETUVAR _fisher_upgraded_to_4_4:\x1d
SETUVAR _fisher_wfxr_2F_forgit_files:\x7e/\x2econfig/fish/conf\x2ed/bin\x1e\x7e/\x2econfig/fish/conf\x2ed/forgit\x2eplugin\x2efish\x1e\x7e/\x2econfig/fish/completions/_git\x2dforgit\x1e\x7e/\x2econfig/fish/completions/git\x2dforgit\x2ebash\x1e\x7e/\x2econfig/fish/completions/git\x2dforgit\x2ezsh
SETUVAR fish_color_autosuggestion:6e738d
SETUVAR fish_color_cancel:ed8796
SETUVAR fish_color_command:8aadf4

View file

@ -1,7 +1,6 @@
function repos
set selected_dir (find ~/Repos/ -type d -name '.git' -prune | sed 's/\/\.git$//' | sed 's/^\.\///' | fzf)
set selected_dir (fd --type d --base-directory ~/Repos/ -H '^\.git$' | sed 's/\/\.git\/$//' | fzf)
if test -n "$selected_dir"
cd "$selected_dir"
vim .
end
end

View file

@ -5,6 +5,5 @@ function allrepos
if test -n "$selected_dir"
cd "$selected_dir"
vim .
end
end

View file

@ -44,7 +44,10 @@ bind=SUPER,space,exec, wofi
bind=SUPER, 23, exec, rofi -show drun -theme ~/.config/rofi/style.rasi # Space key
# Screenshotting
bind=,Print,exec,~/.config/hypr/scripts/screenshot
bind=,Print,exec, hyprshot -m output -o ~/Imagenes/Capturas/PC -f captura-$(date +'%Y-%m-%d-%s').png
bind=SHIFT,Print,exec, hyprshot -m window -o ~/Imagenes/Capturas/PC -f captura-$(date +'%Y-%m-%d-%s').png
bind=CTRL,Print,exec, hyprshot -m region -o ~/Imagenes/Capturas/PC -f captura-$(date +'%Y-%m-%d-%s').png
bind=ALT,Print,exec, ~/.config/hypr/scripts/screenshots
# Logout menu
bind=SUPER, 148, exec, wleave # Custom keyboard key

View file

@ -0,0 +1,16 @@
#!/usr/bin/env python3
import subprocess
monitor_data = subprocess.check_output(["hyprctl", "monitors"], text=True)
lines = monitor_data.split("\n")
current_monitor = ""
# Recorrer las líneas y buscar el nombre y el estado enfocado
for line in lines:
if "Monitor" in line:
current_monitor = line.split(" ", 1)[1].split(" ")[0]
if "focused: yes" in line:
print(current_monitor)
break

View file

@ -1,3 +0,0 @@
#!/usr/bin/bash
grim -g "$(slurp)" - | swappy -f - -o ~/Imagenes/Capturas/PC/screenshot$(date +%s).png

View file

@ -0,0 +1,17 @@
#!/usr/bin/bash
DIRECTORIO_IMAGENES="$HOME/Imagenes/Capturas/PC/"
IMAGENES=$(ls -t "$DIRECTORIO_IMAGENES"/*.png 2>/dev/null)
NOMBRES_IMAGENES=""
for IMAGEN in $IMAGENES; do
NOMBRES_IMAGENES+="$(basename "$IMAGEN")\n"
done
SELECCION=$(echo -e "$NOMBRES_IMAGENES" | rofi -dmenu -i -p "Selecciona una imagen" -theme ~/.config/rofi/style.rasi)
if [ -n "$SELECCION" ]; then
IMAGEN_SELECCIONADA="$DIRECTORIO_IMAGENES/$SELECCION"
swappy -f "$IMAGEN_SELECCIONADA" &
fi

View file

@ -33,11 +33,11 @@ windowrulev2 = workspace 8,class:^(Ryujinx)$
windowrulev2 = workspace 8,class:^(.*steam_app.*)$
windowrulev2 = workspace 5,class:^(photoshop.exe)$
windowrulev2 = workspace 5,class:^(pinta)$
windowrulev2 = workspace 5,class:^(Geeqie)$
## Float
windowrule = float, xfce-polkit
windowrule = float, galculator
windowrule = float, Geeqie
windowrule = float, title:Open File
windowrule = float, title:Open Folder
windowrule = float, title:branchdialog
@ -47,4 +47,4 @@ windowrule = float, nm-connection-editor
## Other
windowrulev2 = center,class:^(kitty)$
windowrulev2 = opacity 0.80, class:^(Rofi)$
windowrule = animation slide, Rofi
windowrule = animation slide, Rofi

View file

@ -262,7 +262,7 @@ scrollback_pager_history_size 0
#: the scrollback buffer with pager. This separate buffer is not
#: available for interactive scrolling but will be piped to the pager
#: program when viewing scrollback buffer in a separate window. The
#: current implementation stores the data in UTF-8, so approximatively
#: current implementation stores the data in UTF-8, so approximately
#: 10000 lines per megabyte at 100 chars per line, for pure ASCII,
#: unformatted text. A value of zero or less disables this feature.
#: The maximum allowed size is 4GB. Note that on config reload if this
@ -437,7 +437,7 @@ pointer_shape_when_dragging beam
#: buttons on a mouse.
#: event-type is one of press, release, doublepress, triplepress,
#: click, doubleclick. modes indicates whether the action is performed
#: click, double-click. modes indicates whether the action is performed
#: when the mouse is grabbed by the program running in the terminal,
#: or not. The values are grabbed or ungrabbed or a comma separated
#: combination of them. grabbed refers to when the program running in
@ -2139,4 +2139,4 @@ map shift+cmd+/ open_url https://sw.kovidgoyal.net/kitty/
#: }}}
#: }}}
#: }}}

View file

@ -1,7 +1,7 @@
{
"LazyVim": { "branch": "main", "commit": "aa1cccf230a01bd85d5173f7d87f782fd83caa88" },
"LuaSnip": { "branch": "master", "commit": "409535b8fc54c650eb845b0c35e0cc7f08810284" },
"SchemaStore.nvim": { "branch": "main", "commit": "6ef970b8acd694fb5690d1b8e1d6ad2ea0cc1431" },
"LuaSnip": { "branch": "master", "commit": "c4d6298347f7707e9757351b2ee03d0c00da5c20" },
"SchemaStore.nvim": { "branch": "main", "commit": "e71b32faec68f04a0f0a27fe8c15c96503039b1f" },
"alpha-nvim": { "branch": "main", "commit": "7a6b9487dba044a43fde534bf5036f0fda5b6b23" },
"autolist.nvim": { "branch": "main", "commit": "5f70a5f99e96c8fe3069de042abd2a8ed2deb855" },
"bufferline.nvim": { "branch": "main", "commit": "417b303328118b6d836ae330142e88771c48a8a3" },
@ -10,6 +10,7 @@
"cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" },
"color-picker.nvim": { "branch": "master", "commit": "06cb5f853535dea529a523e9a0e8884cdf9eba4d" },
"copilot-cmp": { "branch": "master", "commit": "d631b3afbf26bb17d6cf2b3cd8f3d79e7d5eeca1" },
"copilot.lua": { "branch": "master", "commit": "b3798d85322b1aaa56cad9d651d2d1aaec6298e9" },
"crates.nvim": { "branch": "main", "commit": "d5caf28aba49e81ac4099426231f3cf3c151013a" },
@ -17,26 +18,26 @@
"edgy.nvim": { "branch": "main", "commit": "4ccc1c67ae2b1a0c55f18c83d03b714e2bb1bae4" },
"flash.nvim": { "branch": "main", "commit": "967117690bd677cb7b6a87f0bc0077d2c0be3a27" },
"friendly-snippets": { "branch": "main", "commit": "377d45475b49e37460a902d6d569d2093d4037d0" },
"gitsigns.nvim": { "branch": "main", "commit": "5a2b1205841bc06ffb15719b14d54987e17b22ae" },
"gitsigns.nvim": { "branch": "main", "commit": "749267aaa863c30d721c9913699c5d94e0c07dd3" },
"glance.nvim": { "branch": "master", "commit": "ec19dbdabd47fc2f094f7457a84ae78e7c9b5610" },
"glow.nvim": { "branch": "main", "commit": "8942dfb05794f436af4fbc90a34393f1fd36f361" },
"indent-blankline.nvim": { "branch": "master", "commit": "4541d690816cb99a7fc248f1486aa87f3abce91c" },
"lazy.nvim": { "branch": "main", "commit": "3ad55ae678876516156cca2f361c51f7952a924b" },
"live-server.nvim": { "branch": "main", "commit": "8cae0641cabe8c555311f09dbb0ae36a513a9d5c" },
"lualine.nvim": { "branch": "master", "commit": "45e27ca739c7be6c49e5496d14fcf45a303c3a63" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "e86a4c84ff35240639643ffed56ee1c4d55f538e" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "7e8208a4d936f93303cc229af865a2cd226c807f" },
"mason-nvim-dap.nvim": { "branch": "main", "commit": "6148b51db945b55b3b725da39eaea6441e59dff8" },
"mason.nvim": { "branch": "main", "commit": "68e6a153d7cd1251eb85ebb48d2e351e9ab940b8" },
"mason.nvim": { "branch": "main", "commit": "a51c2d063c5377ee9e58c5f9cda7c7436787be72" },
"mdpreview.nvim": { "branch": "master", "commit": "22ca06ae45cb06518600b36418674be456cfb2df" },
"mini.ai": { "branch": "main", "commit": "5218ea75e635df78a807bc9d5a7162594fb76d02" },
"mini.ai": { "branch": "main", "commit": "7ae226f331885e6f30e9a8229e113debc59308ae" },
"mini.bufremove": { "branch": "main", "commit": "7821606e35c1ac931b56d8e3155f45ffe76ee7e5" },
"mini.comment": { "branch": "main", "commit": "877acea5b2a32ff55f808fc0ebe9aa898648318c" },
"mini.indentscope": { "branch": "main", "commit": "f60e9b51a6214c73a170ffc5445ce91560981031" },
"mini.pairs": { "branch": "main", "commit": "dfa9f6e2576bb8853be277d96b735af59d9be7c2" },
"mini.surround": { "branch": "main", "commit": "9d1956b576d7051da3a483b251dfc778121c60db" },
"neo-tree.nvim": { "branch": "v3.x", "commit": "7951701fd21291ac473ea92d3fd57ec5c8bf10bb" },
"neo-tree.nvim": { "branch": "v3.x", "commit": "cac2e1bfa1ecd5bd0ce7ae29e12efb3ba5a7347d" },
"neoconf.nvim": { "branch": "main", "commit": "08f146d53e075055500dca35e93281faff95716b" },
"neodev.nvim": { "branch": "main", "commit": "4681d489cce1604a75435494fe278514f9835a87" },
"neodev.nvim": { "branch": "main", "commit": "47dacc6d8f74936f7719351b025421df740c789b" },
"neoscroll.nvim": { "branch": "master", "commit": "4bc0212e9f2a7bc7fe7a6bceb15b33e39f0f41fb" },
"noice.nvim": { "branch": "main", "commit": "894db25ec726d32047799d4d0a982b701bec453b" },
"nui.nvim": { "branch": "main", "commit": "9e3916e784660f55f47daa6f26053ad044db5d6a" },
@ -44,29 +45,31 @@
"nvim-cmp": { "branch": "main", "commit": "51f1e11a89ec701221877532ee1a23557d291dd5" },
"nvim-colorizer.lua": { "branch": "master", "commit": "dde3084106a70b9a79d48f426f6d6fec6fd203f7" },
"nvim-dap": { "branch": "master", "commit": "1c63f37f95cd4fb54512898168138d9a75d1516a" },
"nvim-dap-go": { "branch": "main", "commit": "208f0e685b48a98bec2cdd8648559c4274b84ca2" },
"nvim-dap-go": { "branch": "main", "commit": "9c0eb2b3c8ca63b54009a42a915be657fe7a8734" },
"nvim-dap-python": { "branch": "master", "commit": "37b4cba02e337a95cb62ad1609b3d1dccb2e5d42" },
"nvim-dap-ui": { "branch": "master", "commit": "85b16ac2309d85c88577cd8ee1733ce52be8227e" },
"nvim-dap-virtual-text": { "branch": "master", "commit": "57f1dbd0458dd84a286b27768c142e1567f3ce3b" },
"nvim-jdtls": { "branch": "master", "commit": "095dc490f362adc85be66dc14bd9665ddd94413b" },
"nvim-lspconfig": { "branch": "master", "commit": "0d29cad8de3b2c654315203fc1fe12fde722a18a" },
"nvim-lspconfig": { "branch": "master", "commit": "67f151e84daddc86cc65f5d935e592f76b9f4496" },
"nvim-navic": { "branch": "master", "commit": "9c89730da6a05acfeb6a197e212dfadf5aa60ca0" },
"nvim-notify": { "branch": "master", "commit": "ea9c8ce7a37f2238f934e087c255758659948e0f" },
"nvim-numbertoggle": { "branch": "main", "commit": "1dcc1507578f6f216917065da9dac169670dbcd3" },
"nvim-scrollview": { "branch": "main", "commit": "e33e4c0ba5bf8fdde4d4d8011f62f6d72669884a" },
"nvim-scrollview": { "branch": "main", "commit": "f826e74d6c20f535a7fa6a94308eacb99c07aba8" },
"nvim-spectre": { "branch": "master", "commit": "5b39919a2947b1266b3aa34d0b0b14c35523bc69" },
"nvim-terminal.lua": { "branch": "master", "commit": "095f98aaa7265628a72cd2706350c091544b5602" },
"nvim-treesitter": { "branch": "master", "commit": "17d3398b5bd0d0042e1a71ee1842a831399cae97" },
"nvim-treesitter-context": { "branch": "master", "commit": "a17c31268b56d53624fdc9cb03a225d4a17cabdb" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "9e519b6146512c8e2e702faf8ac48420f4f5deec" },
"nvim-treesitter": { "branch": "master", "commit": "8fa7ce35afe88b8294e6ced757aa14ec98414568" },
"nvim-treesitter-context": { "branch": "master", "commit": "5dd8c2121170f806c3d0689d9e0dd24250e4f342" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "56272167a6dead91c47c02dbdbfe1ae5643c59f5" },
"nvim-ts-autotag": { "branch": "main", "commit": "6be1192965df35f94b8ea6d323354f7dc7a557e4" },
"nvim-ts-context-commentstring": { "branch": "main", "commit": "e9062e2dfb9854e6a927370f2d720de354c88524" },
"nvim-ts-context-commentstring": { "branch": "main", "commit": "9bff161dfece6ecf3459e6e46ca42e49f9ed939f" },
"nvim-web-devicons": { "branch": "master", "commit": "cfc8824cc1db316a276b36517f093baccb8e799a" },
"persistence.nvim": { "branch": "main", "commit": "4b8051c01f696d8849a5cb8afa9767be8db16e40" },
"plenary.nvim": { "branch": "master", "commit": "267282a9ce242bbb0c5dc31445b6d353bed978bb" },
"presence.nvim": { "branch": "main", "commit": "87c857a56b7703f976d3a5ef15967d80508df6e6" },
"rust-tools.nvim": { "branch": "master", "commit": "0cc8adab23117783a0292a0c8a2fbed1005dc645" },
"sqlite.lua": { "branch": "master", "commit": "b7e28c8463254c46a8e61c52d27d6a2040492fc3" },
"tailwindcss-colorizer-cmp.nvim": { "branch": "main", "commit": "65565c62963579897d28390dbd1ba8fb15ba545f" },
"telescope-all-recent.nvim": { "branch": "main", "commit": "dee20f810aec14c31287988b3baa8c371900cf06" },
"telescope-floaterm.nvim": { "branch": "main", "commit": "ccd3f40ae30dce5de0e5d0f5069e08e7d9ad6d23" },
"telescope-undo.nvim": { "branch": "main", "commit": "3dec002ea3e7952071d26fbb5d01e2038a58a554" },
"telescope.nvim": { "branch": "master", "commit": "2d92125620417fbea82ec30303823e3cd69e90e8" },

View file

@ -97,3 +97,6 @@ vim.api.nvim_set_keymap(
":lua require('neogen').jump_prev<CR>",
{ noremap = true, silent = true, desc = "Prev Neogen Annotation" }
)
vim.keymap.set("n", "<C-c>", "<cmd>PickColor<cr>", { noremap = true, silent = true, desc = "Pick Color" })
vim.keymap.set("i", "<C-c>", "<cmd>PickColorInsert<cr>", { noremap = true, silent = true, desc = "Pick Color" })

View file

@ -0,0 +1,18 @@
return {
{
"ziontee113/color-picker.nvim",
config = function()
require("color-picker").setup({
["icons"] = { "", "" },
["border"] = "rounded", -- none | single | double | rounded | solid | shadow
["keymap"] = { -- mapping example:
["U"] = "<Plug>ColorPickerSlider5Decrease",
["O"] = "<Plug>ColorPickerSlider5Increase",
},
["background_highlight_group"] = "Normal", -- default
["border_highlight_group"] = "FloatBorder", -- default
["text_highlight_group"] = "Normal", --default
})
end,
},
}

View file

@ -0,0 +1,5 @@
return {
{
"kkharji/sqlite.lua",
},
}

View file

@ -0,0 +1,15 @@
return {
{
"prochri/telescope-all-recent.nvim",
config = function()
require("telescope-all-recent").setup({
pickers = {
["workspaces.nvim#workspaces"] = {
disable = false,
sorting = "frecency",
},
},
})
end,
},
}

View file

@ -53,7 +53,7 @@ configuration {
/*---------- History and Sorting ----------*/
disable-history: false;
sorting-method: "normal";
sorting-method: "fzf";
max-history-size: 25;
/*---------- Display setting ----------*/
@ -84,4 +84,4 @@ configuration {
action: "kb-cancel";
delay: 0;
}
}
}

View file

@ -1,10 +1,11 @@
/*****----- Configuration -----*****/
configuration {
modi: "drun,filebrowser,window";
modi: "drun,file-browser-extended,window";
show-icons: true;
display-drun: "Apps";
display-run: "Run";
display-filebrowser: "Files";
display-file-browser-extended: "Files";
display-window: "Windows";
drun-display-format: "{name}\n[<span weight='light' size='small'><i>({generic})</i></span>]";
window-format: "Class : {c}\nWorkspace : {w}";

View file

@ -178,4 +178,4 @@ mantle = "#1e2030"
crust = "#181926"
palette = "catppuccin_flavor"
palette = "catppuccin_macchiato"

View file

@ -1,10 +1,10 @@
[Default]
save_dir=~/Imagenes/Capturas/PC
save_filename_format=screenshot-%Y%m%d-%H%M%S.png
save_dir=$HOME/Imagenes/Capturas/PC/
save_filename_format=captura-%Y-%m-%d-%s.png
show_panel=false
line_size=5
text_size=20
text_font=jetbrainsmono nerd font light
text_font=jetbrainsmono nerd font
paint_mode=brush
early_exit=false
fill_shape=false
fill_shape=false

View file

@ -675,7 +675,7 @@ xplr.config.general.panel_ui.sort_and_filter.border_style = {}
-- Type: nullable list of [Node Sorter](https://xplr.dev/en/sorting#node-sorter-applicable)
xplr.config.general.initial_sorting = {
{ sorter = "ByCanonicalIsDir", reverse = true },
{ sorter = "ByIRelativePath", reverse = false },
{ sorter = "ByIRelativePath", reverse = false },
}
-- The name of one of the modes to use when xplr loads.
@ -1293,6 +1293,25 @@ xplr.config.modes.builtin.default.key_bindings.on_key["l"] =
xplr.config.modes.builtin.default.key_bindings.on_key["right"]
xplr.config.modes.builtin.default.key_bindings.on_key["tab"] =
xplr.config.modes.builtin.default.key_bindings.on_key["ctrl-i"] -- compatibility workaround
xplr.config.modes.builtin.default.key_bindings.on_key.P = {
help = "preview",
messages = {
{
BashExecSilently0 = [===[
FIFO_PATH="/tmp/xplr.fifo"
if [ -e "$FIFO_PATH" ]; then
"$XPLR" -m StopFifo
rm -f -- "$FIFO_PATH"
else
mkfifo "$FIFO_PATH"
"$HOME/.local/bin/imv-open.sh" "$FIFO_PATH" "$XPLR_FOCUS_PATH" &
"$XPLR" -m 'StartFifo: %q' "$FIFO_PATH"
fi
]===],
},
},
}
-- The builtin debug error mode.
--

View file

@ -23,10 +23,19 @@
diffFilter = delta --color-only
[delta]
navigate = true # use n and N to move between diff sections
light = false # set to true if you're in a terminal w/ a light background color (e.g. the default macOS terminal)
light = false
dark = true
side-by-side = true
line-numbers = true
syntax-theme = Monokai Extended
features = decorations
line-numbers-minus-style = "#ed8796"
line-numbers-plus-style = "#a6da95"
line-numbers-zero-style = "#cad3f5"
minus-style = "#24273a" bold "#aa4b59"
minus-emph-style = "#24273a" bold "#ed8796"
file-style = "#b7bdf8"
plus-style = "#24273a" bold "#478a37"
plus-emph-style = "#24273a" bold "#a6da95"
[merge]
conflictstyle = diff3
[pager]

File diff suppressed because one or more lines are too long