This commit is contained in:
Greg 2026-02-23 22:20:58 +02:00
commit b6dd8a891a
95 changed files with 6623 additions and 0 deletions

222
.config/copyq/copyq.conf Normal file
View file

@ -0,0 +1,222 @@
[General]
plugin_priority=itemimage, itemencrypted, itemfakevim, itemnotes, itempinned, itemsync, itemtags, itemtext
[Options]
activate_closes=true
activate_focuses=true
activate_item_with_single_click=false
activate_pastes=true
always_on_top=true
autocompletion=true
autostart=false
check_clipboard=true
check_selection=false
clipboard_notification_lines=0
clipboard_tab=&clipboard
close_on_unfocus=true
close_on_unfocus_delay_ms=500
command_history_size=100
confirm_exit=true
copy_clipboard=false
copy_selection=false
disable_tray=false
edit_ctrl_return=true
editor=nvim %1
expire_tab=0
filter_case_insensitive=true
filter_regular_expression=false
frameless_window=false
hide_main_window=true
hide_main_window_in_task_bar=false
hide_tabs=true
hide_toolbar=true
hide_toolbar_labels=true
item_data_threshold=1024
item_popup_interval=0
language=en
max_process_manager_rows=1000
maxitems=200
move=true
native_menu_bar=true
native_notifications=true
native_tray_menu=false
navigation_style=0
notification_horizontal_offset=10
notification_maximum_height=100
notification_maximum_width=300
notification_position=3
notification_vertical_offset=10
number_search=false
open_windows_on_current_screen=true
prevent_screen_cature=true
restore_geometry=true
row_index_from_one=true
run_selection=false
save_delay_ms_on_item_added=300000
save_delay_ms_on_item_edited=1000
save_delay_ms_on_item_modified=300000
save_delay_ms_on_item_moved=1800000
save_delay_ms_on_item_removed=600000
save_filter_history=false
save_on_app_deactivated=true
script_paste_delay_ms=250
show_advanced_command_settings=false
show_simple_items=false
show_tab_item_count=false
style=
tab_tree=false
tabs=&clipboard
text_tab_width=8
text_wrap=true
transparency=0
transparency_focused=0
tray_commands=true
tray_images=true
tray_item_paste=true
tray_items=5
tray_menu_open_on_left_click=false
tray_tab=
tray_tab_is_current=true
update_clipboard_owner_delay_ms=-1
window_key_press_time_ms=50
window_paste_with_ctrl_v_regex=
window_wait_after_raised_ms=50
window_wait_before_raise_ms=20
window_wait_for_modifier_released_ms=2000
window_wait_raised_ms=150
[Plugins]
itemencrypted\enabled=true
itemfakevim\enabled=true
itemfakevim\really_enable=false
itemfakevim\source_file=
itemimage\enabled=true
itemimage\image_editor=
itemimage\max_image_height=240
itemimage\max_image_width=320
itemimage\svg_editor=
itemnotes\enabled=true
itempinned\enabled=true
itemsync\enabled=true
itemtags\enabled=true
itemtext\enabled=true
[Shortcuts]
about=shift+f1
change_tab_icon=ctrl+shift+t
commands=f6
copy_selected_items=ctrl+c
delete_item=del
edit=f2
edit_notes=shift+f2
editor=ctrl+e
editor_background=
editor_bold=ctrl+b
editor_cancel=esc
editor_erase_style=
editor_font=
editor_foreground=
editor_italic=ctrl+i
editor_redo=ctrl+shift+z
editor_save=f2
editor_search=ctrl+f
editor_strikethrough=
editor_underline=ctrl+u
editor_undo=ctrl+z
exit=ctrl+q
export=ctrl+s
find_items=f3
help=f1
import=ctrl+i
item-menu=shift+f10
move_down=ctrl+down
move_to_bottom=ctrl+end
move_to_clipboard=
move_to_top=ctrl+home
move_up=ctrl+up
new=ctrl+n
new_tab=ctrl+t
next_tab=right
paste_selected_items=ctrl+v
preferences=ctrl+p
previous_tab=left
process_manager=ctrl+shift+z
remove_tab=ctrl+w
rename_tab=ctrl+f2
reverse_selected_items=ctrl+shift+r
show-log=f12
show_clipboard_content=ctrl+shift+c
show_item_content=f4
show_item_preview=f7
sort_selected_items=ctrl+shift+s
system-run=f5
toggle_clipboard_storing=ctrl+shift+x
[Tabs]
1\icon=
1\max_item_count=0
1\name=&clipboard
1\store_items=true
size=1
[Theme]
alt_bg=#383838
alt_item_css=
bg=#4b4b4b
css=
css_template_items=items
css_template_main_window=main_window
css_template_menu=menu
css_template_notification=notification
cur_item_css="\n ;border: 0.1em solid ${sel_bg}"
edit_bg=#ffffff
edit_fg=#1a1a1a
edit_font="Sans,11,-1,5,50,0,0,0,0,0"
fg=#dfdfdf
find_bg=#00689c
find_fg=#ffffff
find_font="Sans,10,-1,5,50,0,0,0,0,0"
font="Sans,10,-1,5,50,0,0,0,0,0"
font_antialiasing=true
hover_item_css=
icon_size=16
item_css=
item_spacing=
menu_bar_css="\n ;background: ${bg}\n ;color: ${fg}"
menu_bar_disabled_css="\n ;color: ${bg - #666}"
menu_bar_selected_css="\n ;background: ${sel_bg}\n ;color: ${sel_fg}"
menu_css="\n ;border: 1px solid ${sel_bg}\n ;background: ${bg}\n ;color: ${fg}"
notes_bg=#ffffff
notes_css=
notes_fg=#232323
notes_font="Sans,11,-1,5,50,0,0,0,0,0"
notification_bg=#333
notification_fg=#ddd
notification_font=
num_fg=#7f7f7f
num_font="Sans,7,-1,5,25,0,0,0,0,0"
num_margin=2
num_sel_fg=
search_bar="\n ;background: ${edit_bg}\n ;color: ${edit_fg}\n ;border: 1px solid ${alt_bg}\n ;margin: 2px"
search_bar_focused="\n ;border: 1px solid ${sel_bg}"
sel_bg=#61819c
sel_fg=#ffffff
sel_item_css=
show_number=false
show_scrollbars=false
style_main_window=true
tab_bar_css="\n ;background: ${bg - #222}"
tab_bar_item_counter="\n ;color: ${fg - #044 + #400}\n ;font-size: 6pt"
tab_bar_scroll_buttons_css="\n ;background: ${bg - #222}\n ;color: ${fg}\n ;border: 0"
tab_bar_sel_item_counter="\n ;color: ${sel_bg - #044 + #400}"
tab_bar_tab_selected_css="\n ;padding: 0.5em\n ;background: ${bg}\n ;border: 0.05em solid ${bg}\n ;color: ${fg}"
tab_bar_tab_unselected_css="\n ;border: 0.05em solid ${bg}\n ;padding: 0.5em\n ;background: ${bg - #222}\n ;color: ${fg - #333}"
tab_tree_css="\n ;color: ${fg}\n ;background-color: ${bg}"
tab_tree_item_counter="\n ;color: ${fg - #044 + #400}\n ;font-size: 6pt"
tab_tree_sel_item_counter="\n ;color: ${sel_fg - #044 + #400}"
tab_tree_sel_item_css="\n ;color: ${sel_fg}\n ;background-color: ${sel_bg}\n ;border-radius: 2px"
tool_bar_css="\n ;color: ${fg}\n ;background-color: ${bg}\n ;border: 0"
tool_button_css="\n ;color: ${fg}\n ;background: ${bg}\n ;border: 0\n ;border-radius: 2px"
tool_button_pressed_css="\n ;background: ${sel_bg}"
tool_button_selected_css="\n ;background: ${sel_bg - #222}\n ;color: ${sel_fg}\n ;border: 1px solid ${sel_bg}"
use_system_icons=true

316
.config/dunst/dunstrc Normal file
View file

@ -0,0 +1,316 @@
[global]
### Display ###
# Which monitor should the notifications be displayed on.
monitor = 0
# Display notification on focused monitor. Possible modes are:
# mouse: follow mouse pointer
# keyboard: follow window with keyboard focus
# none: don't follow anything
#
# "keyboard" needs a window manager that exports the
# _NET_ACTIVE_WINDOW property.
# This should be the case for almost all modern window managers.
#
# If this option is set to mouse or keyboard, the monitor option
# will be ignored.
follow = mouse
# The geometry of the window:
# [{width}]x{height}[+/-{x}+/-{y}]
# The geometry of the message window.
# The height is measured in number of notifications everything else
# in pixels. If the width is omitted but the height is given
# ("-geometry x2"), the message window expands over the whole screen
# (dmenu-like). If width is 0, the window expands to the longest
# message displayed. A positive x is measured from the left, a
# negative from the right side of the screen. Y is measured from
# the top and down respectively.
# The width can be negative. In this case the actual width is the
# screen width minus the width defined in within the geometry option.
geometry = "350x7-13+32"
# Show how many messages are currently hidden (because of geometry).
indicate_hidden = yes
# Shrink window if it's smaller than the width. Will be ignored if
# width is 0.
shrink = no
# The transparency of the window. Range: [0; 100].
# This option will only work if a compositing window manager is
# present (e.g. xcompmgr, compiz, etc.).
transparency = 1
# The height of the entire notification. If the height is smaller
# than the font height and padding combined, it will be raised
# to the font height and padding.
notification_height = 0
# Draw a line of "separator_height" pixel height between two
# notifications.
# Set to 0 to disable.
separator_height = 2
# Padding between text and separator.
padding = 8
# Horizontal padding.
horizontal_padding = 8
# Defines width in pixels of frame around the notification window.
# Set to 0 to disable.
frame_width = 2
# Defines color of the frame around the notification window.
frame_color = "#5E81AC"
# Define a color for the separator.
# possible values are:
# * auto: dunst tries to find a color fitting to the background;
# * foreground: use the same color as the foreground;
# * frame: use the same color as the frame;
# * anything else will be interpreted as a X color.
separator_color = frame
# Sort messages by urgency.
sort = yes
# Don't remove messages, if the user is idle (no mouse or keyboard input)
# for longer than idle_threshold seconds.
# Set to 0 to disable.
idle_threshold = 200
### Text ###
font = SF Pro Display 11
# The spacing between lines. If the height is smaller than the
# font height, it will get raised to the font height.
line_height = 1
# Possible values are:
# full: Allow a small subset of html markup in notifications:
# <b>bold</b>
# <i>italic</i>
# <s>strikethrough</s>
# <u>underline</u>
#
# For a complete reference see
# <http://developer.gnome.org/pango/stable/PangoMarkupFormat.html>.
#
# strip: This setting is provided for compatibility with some broken
# clients that send markup even though it's not enabled on the
# server. Dunst will try to strip the markup but the parsing is
# simplistic so using this option outside of matching rules for
# specific applications *IS GREATLY DISCOURAGED*.
#
# no: Disable markup parsing, incoming notifications will be treated as
# plain text. Dunst will not advertise that it has the body-markup
# capability if this is set as a global setting.
#
# It's important to note that markup inside the format option will be parsed
# regardless of what this is set to.
markup = yes
# The format of the message. Possible variables are:
# %a appname
# %s summary
# %b body
# %i iconname (including its path)
# %I iconname (without its path)
# %p progress value if set ([ 0%] to [100%]) or nothing
# %n progress value if set without any extra characters
# Markup is allowed
#format = "<b>%s</b>\n%b"
format = "<b>%s %p</b>\n%b\n%p"
# Alignment of message text.
# Possible values are "left", "center" and "right".
alignment = center
# Show age of message if message is older than show_age_threshold
# seconds.
# Set to -1 to disable.
show_age_threshold = 60
# Split notifications into multiple lines if they don't fit into
# geometry.
word_wrap = yes
# Ignore newlines '\n' in notifications.
ignore_newline = no
ellipsize = middle
# Merge multiple notifications with the same content
stack_duplicates = true
# Hide the count of merged notifications with the same content
hide_duplicate_count = false
# Display indicators for URLs (U) and actions (A).
show_indicators = yes
### Icons ###
# Align icons left/right/off
icon_position = left
# Scale larger icons down to this size, set to 0 to disable
max_icon_size = 32
# Paths to default icons.
icon_path = /usr/share/icons/Papirus-Dark/16x16/status/:/usr/share/icons/Papirus-Dark/16x16/devices/
# Should a notification popped up from history be sticky or timeout
# as if it would normally do.
sticky_history = yes
# Maximum amount of notifications kept in history
history_length = 20
### Misc/Advanced ###
# dmenu path.
dmenu = /usr/bin/dmenu -p dunst:
# Browser for opening urls in context menu.
browser = /usr/bin/brave
# Always run rule-defined scripts, even if the notification is suppressed
always_run_script = true
# Define the title of the windows spawned by dunst
title = Dunst
# Define the class of the windows spawned by dunst
class = Dunst
# Print a notification on startup.
# This is mainly for error detection, since dbus (re-)starts dunst
# automatically after a crash.
startup_notification = false
### Legacy
# Use the Xinerama extension instead of RandR for multi-monitor support.
# This setting is provided for compatibility with older nVidia drivers that
# do not support RandR and using it on systems that support RandR is highly
# discouraged.
#
# By enabling this setting dunst will not be able to detect when a monitor
# is connected or disconnected which might break follow mode if the screen
# layout changes.
force_xinerama = false
# Experimental features that may or may not work correctly. Do not expect them
# to have a consistent behaviour across releases.
[experimental]
# Calculate the dpi to use on a per-monitor basis.
# If this setting is enabled the Xft.dpi value will be ignored and instead
# dunst will attempt to calculate an appropriate dpi value for each monitor
# using the resolution and physical size. This might be useful in setups
# where there are multiple screens with very different dpi values.
per_monitor_dpi = false
[shortcuts]
# Shortcuts are specified as [modifier+][modifier+]...key
# Available modifiers are "ctrl", "mod1" (the alt-key), "mod2",
# "mod3" and "mod4" (windows-key).
# Xev might be helpful to find names for keys.
# Close notification.
close = ctrl+space
# Close all notifications.
close_all = ctrl+shift+space
# Redisplay last message(s).
# On the US keyboard layout "grave" is normally above TAB and left
# of "1". Make sure this key actually exists on your keyboard layout,
# e.g. check output of 'xmodmap -pke'
history = ctrl+mod1+j
[urgency_low]
msg_urgency = low
background = "#2E344090"
foreground = "#D8DEE9"
timeout= 4
[urgency_normal]
msg_urgency = normal
background = "#3B425299"
foreground = "#E5E9F0"
timeout = 4
[urgency_critical]
msg_urgency = critical
background = "#2E344099"
foreground = "#D08770"
timeout = 0
# Every section that isn't one of the above is interpreted as a rules to
# override settings for certain messages.
# Messages can be matched by "appname", "summary", "body", "icon", "category",
# "msg_urgency" and you can override the "timeout", "urgency", "foreground",
# "background", "new_icon" and "format".
# Shell-like globbing will get expanded.
#
# SCRIPTING
# You can specify a script that gets run when the rule matches by
# setting the "script" option.
# The script will be called as follows:
# script appname summary body icon urgency
# where urgency can be "LOW", "NORMAL" or "CRITICAL".
#
# NOTE: if you don't want a notification to be displayed, set the format
# to "".
# NOTE: It might be helpful to run dunst -print in a terminal in order
# to find fitting options for rules.
#[espeak]
# summary = "*"
# script = dunst_espeak.sh
#[script-test]
# summary = "*script*"
# script = dunst_test.sh
#[ignore]
# # This notification will not be displayed
# summary = "foobar"
# format = ""
#[history-ignore]
# # This notification will not be saved in history
# summary = "foobar"
# history_ignore = yes
#[signed_on]
# appname = Pidgin
# summary = "*signed on*"
# urgency = low
#
#[signed_off]
# appname = Pidgin
# summary = *signed off*
# urgency = low
#
#[says]
# appname = Pidgin
# summary = *says*
# urgency = critical
#
#[twitter]
# appname = Pidgin
# summary = *twitter.com*
# urgency = normal
#
# vim: ft=cfg

2
.config/fish/.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
env.fish
fish_variables

View file

@ -0,0 +1,131 @@
#compdef git-forgit -p 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.
_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-reflog() {
declare -a cmds
cmds=('expire:prune old reflog entries' 'delete:delete entries from reflog' 'show:show log of ref' 'exists:check whether a ref has a reflog')
_alternative 'cmds:: _describe -t cmds cmd cmds' 'refs:: __git_references'
}
_git-forgit() {
local subcommand 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)
else
# The last word is the relevant command
cmd=${words[(( ${#words} - 1 ))]}
fi
case ${cmd} in
forgit)
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'
'reflog:git reflog 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
;;
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 ;;
reflog) _git-forgit-reflog ;;
rebase) _git-rebase ;;
reset_head) _git-staged ;;
revert_commit) __git_recent_commits ;;
stash_show) _git-stash-show ;;
esac
}
# 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
# 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-reflog forgit::reflog
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
# this is the case of calling the command and pressing tab
# the very first time of a shell session, we have to manually
# call the dispatch function
if [[ $funcstack[1] == "_git-forgit" ]]; then
_git-forgit "$@"
fi

View file

@ -0,0 +1,186 @@
# This is terribly complicated
# It's because:
# 1. bun run has to have dynamic completions
# 2. there are global options
# 3. bun {install add remove} gets special options
# 4. I don't know how to write fish completions well
# Contributions very welcome!!
function __fish__get_bun_bins
string split ' ' (bun getcompletes b)
end
function __fish__get_bun_scripts
set -lx SHELL bash
set -lx MAX_DESCRIPTION_LEN 40
string trim (string split '\n' (string split '\t' (bun getcompletes z)))
end
function __fish__get_bun_packages
if test (commandline -ct) != ""
set -lx SHELL fish
string split ' ' (bun getcompletes a (commandline -ct))
end
end
function __history_completions
set -l tokens (commandline --current-process --tokenize)
history --prefix (commandline) | string replace -r \^$tokens[1]\\s\* "" | string replace -r \^$tokens[2]\\s\* "" | string split ' '
end
function __fish__get_bun_bun_js_files
string split ' ' (bun getcompletes j)
end
set -l bun_install_boolean_flags yarn production optional development no-save dry-run force no-cache silent verbose global
set -l bun_install_boolean_flags_descriptions "Write a yarn.lock file (yarn v1)" "Don't install devDependencies" "Add dependency to optionalDependencies" "Add dependency to devDependencies" "Don't update package.json or save a lockfile" "Don't install anything" "Always request the latest versions from the registry & reinstall all dependencies" "Ignore manifest cache entirely" "Don't output anything" "Excessively verbose logging" "Use global folder"
set -l bun_builtin_cmds_without_run dev create help bun upgrade discord install remove add init pm x
set -l bun_builtin_cmds_accepting_flags create help bun upgrade discord run init link unlink pm x
function __bun_complete_bins_scripts --inherit-variable bun_builtin_cmds_without_run -d "Emit bun completions for bins and scripts"
# Do nothing if we already have a builtin subcommand,
# or any subcommand other than "run".
if __fish_seen_subcommand_from $bun_builtin_cmds_without_run
or not __fish_use_subcommand && not __fish_seen_subcommand_from run
return
end
# Do we already have a bin or script subcommand?
set -l bins (__fish__get_bun_bins)
if __fish_seen_subcommand_from $bins
return
end
# Scripts have descriptions appended with a tab separator.
# Strip off descriptions for the purposes of subcommand testing.
set -l scripts (__fish__get_bun_scripts)
if __fish_seen_subcommand_from (string split \t -f 1 -- $scripts)
return
end
# Emit scripts.
for script in $scripts
echo $script
end
# Emit binaries and JS files (but only if we're doing `bun run`).
if __fish_seen_subcommand_from run
for bin in $bins
echo "$bin"\t"package bin"
end
for file in (__fish__get_bun_bun_js_files)
echo "$file"\t"Bun.js"
end
end
end
# Clear existing completions
complete -e -c bun
# Dynamically emit scripts and binaries
complete -c bun -f -a "(__bun_complete_bins_scripts)"
# Complete flags if we have no subcommand or a flag-friendly one.
set -l flag_applies "__fish_use_subcommand; or __fish_seen_subcommand_from $bun_builtin_cmds_accepting_flags"
complete -c bun \
-n $flag_applies --no-files -s 'u' -l 'origin' -r -d 'Server URL. Rewrites import paths'
complete -c bun \
-n $flag_applies --no-files -s 'p' -l 'port' -r -d 'Port number to start server from'
complete -c bun \
-n $flag_applies --no-files -s 'd' -l 'define' -r -d 'Substitute K:V while parsing, e.g. --define process.env.NODE_ENV:\"development\"'
complete -c bun \
-n $flag_applies --no-files -s 'e' -l 'external' -r -d 'Exclude module from transpilation (can use * wildcards). ex: -e react'
complete -c bun \
-n $flag_applies --no-files -l 'use' -r -d 'Use a framework (ex: next)'
complete -c bun \
-n $flag_applies --no-files -l 'hot' -r -d 'Enable hot reloading in Bun\'s JavaScript runtime'
# Complete dev and create as first subcommand.
complete -c bun \
-n "__fish_use_subcommand" -a 'dev' -d 'Start dev server'
complete -c bun \
-n "__fish_use_subcommand" -a 'create' -f -d 'Create a new project from a template'
# Complete "next" and "react" if we've seen "create".
complete -c bun \
-n "__fish_seen_subcommand_from create" -a 'next' -d 'new Next.js project'
complete -c bun \
-n "__fish_seen_subcommand_from create" -a 'react' -d 'new React project'
# Complete "upgrade" as first subcommand.
complete -c bun \
-n "__fish_use_subcommand" -a 'upgrade' -d 'Upgrade bun to the latest version' -x
# Complete "-h/--help" unconditionally.
complete -c bun \
-s "h" -l "help" -d 'See all commands and flags' -x
# Complete "-v/--version" if we have no subcommand.
complete -c bun \
-n "not __fish_use_subcommand" -l "version" -s "v" -d 'Bun\'s version' -x
# Complete additional subcommands.
complete -c bun \
-n "__fish_use_subcommand" -a 'discord' -d 'Open bun\'s Discord server' -x
complete -c bun \
-n "__fish_use_subcommand" -a 'bun' -d 'Generate a new bundle'
complete -c bun \
-n "__fish_seen_subcommand_from bun" -F -d 'Bundle this'
complete -c bun \
-n "__fish_seen_subcommand_from create; and __fish_seen_subcommand_from react next" -F -d "Create in directory"
complete -c bun \
-n "__fish_use_subcommand" -a 'init' -F -d 'Start an empty Bun project'
complete -c bun \
-n "__fish_use_subcommand" -a 'install' -f -d 'Install packages from package.json'
complete -c bun \
-n "__fish_use_subcommand" -a 'add' -F -d 'Add a package to package.json'
complete -c bun \
-n "__fish_use_subcommand" -a 'remove' -F -d 'Remove a package from package.json'
for i in (seq (count $bun_install_boolean_flags))
complete -c bun \
-n "__fish_seen_subcommand_from install add remove" -l "$bun_install_boolean_flags[$i]" -d "$bun_install_boolean_flags_descriptions[$i]"
end
complete -c bun \
-n "__fish_seen_subcommand_from install add remove" -l 'cwd' -d 'Change working directory'
complete -c bun \
-n "__fish_seen_subcommand_from install add remove" -l 'cache-dir' -d 'Choose a cache directory (default: $HOME/.bun/install/cache)'
complete -c bun \
-n "__fish_seen_subcommand_from add" -d 'Popular' -a '(__fish__get_bun_packages)'
complete -c bun \
-n "__fish_seen_subcommand_from add" -d 'History' -a '(__history_completions)'
complete -c bun \
-n "__fish_seen_subcommand_from pm; and not __fish_seen_subcommand_from (__fish__get_bun_bins) (__fish__get_bun_scripts) cache;" -a 'bin ls cache hash hash-print hash-string' -f
complete -c bun \
-n "__fish_seen_subcommand_from pm; and __fish_seen_subcommand_from cache; and not __fish_seen_subcommand_from (__fish__get_bun_bins) (__fish__get_bun_scripts);" -a 'rm' -f
# Add built-in subcommands with descriptions.
complete -c bun -n "__fish_use_subcommand" -a "create" -f -d "Create a new project from a template"
complete -c bun -n "__fish_use_subcommand" -a "build bun" --require-parameter -F -d "Transpile and bundle one or more files"
complete -c bun -n "__fish_use_subcommand" -a "upgrade" -d "Upgrade Bun"
complete -c bun -n "__fish_use_subcommand" -a "run" -d "Run a script or package binary"
complete -c bun -n "__fish_use_subcommand" -a "install" -d "Install dependencies from package.json" -f
complete -c bun -n "__fish_use_subcommand" -a "remove" -d "Remove a dependency from package.json" -f
complete -c bun -n "__fish_use_subcommand" -a "add" -d "Add a dependency to package.json" -f
complete -c bun -n "__fish_use_subcommand" -a "init" -d "Initialize a Bun project in this directory" -f
complete -c bun -n "__fish_use_subcommand" -a "link" -d "Register or link a local npm package" -f
complete -c bun -n "__fish_use_subcommand" -a "unlink" -d "Unregister a local npm package" -f
complete -c bun -n "__fish_use_subcommand" -a "pm" -d "Additional package management utilities" -f
complete -c bun -n "__fish_use_subcommand" -a "x" -d "Execute a package binary, installing if needed" -f
complete -c bun -n "__fish_use_subcommand" -a "outdated" -d "Display the latest versions of outdated dependencies" -f
complete -c bun -n "__fish_use_subcommand" -a "publish" -d "Publish your package from local to npm" -f

View file

@ -0,0 +1,7 @@
complete --command fisher --exclusive --long help --description "Print help"
complete --command fisher --exclusive --long version --description "Print version"
complete --command fisher --exclusive --condition __fish_use_subcommand --arguments install --description "Install plugins"
complete --command fisher --exclusive --condition __fish_use_subcommand --arguments update --description "Update installed plugins"
complete --command fisher --exclusive --condition __fish_use_subcommand --arguments remove --description "Remove installed plugins"
complete --command fisher --exclusive --condition __fish_use_subcommand --arguments list --description "List installed plugins matching regex"
complete --command fisher --exclusive --condition "__fish_seen_subcommand_from update remove" --arguments "(fisher list)"

View file

@ -0,0 +1,159 @@
# 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
reflog
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 ;;
reflog) _git_reflog ;;
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::reflog _git_reflog
__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_reflog}" _git_reflog
__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,61 @@
#
# forgit completions for fish plugin
#
# Place this file inside your <fish_config_dir>/completions/ directory.
# It's usually located at ~/.config/fish/completions/. The file is lazily
# sourced when git-forgit command or forgit subcommand of git is invoked.
function __fish_forgit_needs_subcommand
for subcmd in add blame branch_delete checkout_branch checkout_commit checkout_file checkout_tag \
cherry_pick cherry_pick_from_branch clean diff fixup ignore log reflog rebase reset_head \
revert_commit stash_show stash_push
if contains -- $subcmd (commandline -opc)
return 1
end
end
return 0
end
# Load helper functions in git completion file
not functions -q __fish_git && source $__fish_data_dir/completions/git.fish
# No file completion by default
complete -c git-forgit -x
complete -c git-forgit -n __fish_forgit_needs_subcommand -a add -d 'git add selector'
complete -c git-forgit -n __fish_forgit_needs_subcommand -a blame -d 'git blame viewer'
complete -c git-forgit -n __fish_forgit_needs_subcommand -a branch_delete -d 'git branch deletion selector'
complete -c git-forgit -n __fish_forgit_needs_subcommand -a checkout_branch -d 'git checkout branch selector'
complete -c git-forgit -n __fish_forgit_needs_subcommand -a checkout_commit -d 'git checkout commit selector'
complete -c git-forgit -n __fish_forgit_needs_subcommand -a checkout_file -d 'git checkout-file selector'
complete -c git-forgit -n __fish_forgit_needs_subcommand -a checkout_tag -d 'git checkout tag selector'
complete -c git-forgit -n __fish_forgit_needs_subcommand -a cherry_pick -d 'git cherry-picking'
complete -c git-forgit -n __fish_forgit_needs_subcommand -a cherry_pick_from_branch -d 'git cherry-picking with interactive branch selection'
complete -c git-forgit -n __fish_forgit_needs_subcommand -a clean -d 'git clean selector'
complete -c git-forgit -n __fish_forgit_needs_subcommand -a diff -d 'git diff viewer'
complete -c git-forgit -n __fish_forgit_needs_subcommand -a fixup -d 'git fixup'
complete -c git-forgit -n __fish_forgit_needs_subcommand -a ignore -d 'git ignore generator'
complete -c git-forgit -n __fish_forgit_needs_subcommand -a log -d 'git commit viewer'
complete -c git-forgit -n __fish_forgit_needs_subcommand -a reflog -d 'git reflog viewer'
complete -c git-forgit -n __fish_forgit_needs_subcommand -a rebase -d 'git rebase'
complete -c git-forgit -n __fish_forgit_needs_subcommand -a reset_head -d 'git reset HEAD (unstage) selector'
complete -c git-forgit -n __fish_forgit_needs_subcommand -a revert_commit -d 'git revert commit selector'
complete -c git-forgit -n __fish_forgit_needs_subcommand -a stash_show -d 'git stash viewer'
complete -c git-forgit -n __fish_forgit_needs_subcommand -a stash_push -d 'git stash push selector'
complete -c git-forgit -n '__fish_seen_subcommand_from add' -a "(complete -C 'git add ')"
complete -c git-forgit -n '__fish_seen_subcommand_from branch_delete' -a "(__fish_git_local_branches)"
complete -c git-forgit -n '__fish_seen_subcommand_from checkout_branch' -a "(complete -C 'git switch ')"
complete -c git-forgit -n '__fish_seen_subcommand_from checkout_commit' -a "(__fish_git_commits)"
complete -c git-forgit -n '__fish_seen_subcommand_from checkout_file' -a "(__fish_git_files modified)"
complete -c git-forgit -n '__fish_seen_subcommand_from checkout_tag' -a "(__fish_git_tags)" -d Tag
complete -c git-forgit -n '__fish_seen_subcommand_from cherry_pick' -a "(complete -C 'git cherry-pick ')"
complete -c git-forgit -n '__fish_seen_subcommand_from clean' -a "(__fish_git_files untracked ignored)"
complete -c git-forgit -n '__fish_seen_subcommand_from fixup' -a "(__fish_git_local_branches)"
complete -c git-forgit -n '__fish_seen_subcommand_from log' -a "(complete -C 'git log ')"
complete -c git-forgit -n '__fish_seen_subcommand_from reflog' -a "(complete -C 'git reflog ')"
complete -c git-forgit -n '__fish_seen_subcommand_from rebase' -a "(complete -C 'git rebase ')"
complete -c git-forgit -n '__fish_seen_subcommand_from reset_head' -a "(__fish_git_files all-staged)"
complete -c git-forgit -n '__fish_seen_subcommand_from revert_commit' -a "(__fish_git_commits)"
complete -c git-forgit -n '__fish_seen_subcommand_from stash_show' -a "(__fish_git_complete_stashes)"
complete -c git-forgit -n '__fish_seen_subcommand_from stash_push' -a "(__fish_git_files modified deleted modified-staged-deleted)"

View file

View file

@ -0,0 +1,21 @@
complete --command nvm --exclusive
complete --command nvm --exclusive --long version --description "Print version"
complete --command nvm --exclusive --long help --description "Print help"
complete --command nvm --long silent --description "Suppress standard output"
complete --command nvm --exclusive --condition __fish_use_subcommand --arguments install --description "Download and activate the specified Node version"
complete --command nvm --exclusive --condition __fish_use_subcommand --arguments use --description "Activate the specified Node version in the current shell"
complete --command nvm --exclusive --condition __fish_use_subcommand --arguments list --description "List installed Node versions"
complete --command nvm --exclusive --condition __fish_use_subcommand --arguments list-remote --description "List available Node versions to install"
complete --command nvm --exclusive --condition __fish_use_subcommand --arguments current --description "Print the currently-active Node version"
complete --command nvm --exclusive --condition "__fish_seen_subcommand_from install" --arguments "(
test -e $nvm_data && string split ' ' <$nvm_data/.index
)"
complete --command nvm --exclusive --condition "__fish_seen_subcommand_from use" --arguments "(_nvm_list | string split ' ')"
complete --command nvm --exclusive --condition __fish_use_subcommand --arguments uninstall --description "Uninstall the specified Node version"
complete --command nvm --exclusive --condition "__fish_seen_subcommand_from uninstall" --arguments "(
_nvm_list | string split ' ' | string replace system ''
)"
complete --command nvm --exclusive --condition "__fish_seen_subcommand_from use uninstall" --arguments "(
set --query nvm_default_version && echo default
)"

View file

@ -0,0 +1,202 @@
complete -c rustup -n "__fish_use_subcommand" -s v -l verbose -d 'Enable verbose output'
complete -c rustup -n "__fish_use_subcommand" -s q -l quiet -d 'Disable progress output'
complete -c rustup -n "__fish_use_subcommand" -s h -l help -d 'Prints help information'
complete -c rustup -n "__fish_use_subcommand" -s V -l version -d 'Prints version information'
complete -c rustup -n "__fish_use_subcommand" -f -a "dump-testament" -d 'Dump information about the build'
complete -c rustup -n "__fish_use_subcommand" -f -a "show" -d 'Show the active and installed toolchains or profiles'
complete -c rustup -n "__fish_use_subcommand" -f -a "install" -d 'Update Rust toolchains'
complete -c rustup -n "__fish_use_subcommand" -f -a "uninstall" -d 'Uninstall Rust toolchains'
complete -c rustup -n "__fish_use_subcommand" -f -a "update" -d 'Update Rust toolchains and rustup'
complete -c rustup -n "__fish_use_subcommand" -f -a "check" -d 'Check for updates to Rust toolchains and rustup'
complete -c rustup -n "__fish_use_subcommand" -f -a "default" -d 'Set the default toolchain'
complete -c rustup -n "__fish_use_subcommand" -f -a "toolchain" -d 'Modify or query the installed toolchains'
complete -c rustup -n "__fish_use_subcommand" -f -a "target" -d 'Modify a toolchain\'s supported targets'
complete -c rustup -n "__fish_use_subcommand" -f -a "component" -d 'Modify a toolchain\'s installed components'
complete -c rustup -n "__fish_use_subcommand" -f -a "override" -d 'Modify directory toolchain overrides'
complete -c rustup -n "__fish_use_subcommand" -f -a "run" -d 'Run a command with an environment configured for a given toolchain'
complete -c rustup -n "__fish_use_subcommand" -f -a "which" -d 'Display which binary will be run for a given command'
complete -c rustup -n "__fish_use_subcommand" -f -a "doc" -d 'Open the documentation for the current toolchain'
complete -c rustup -n "__fish_use_subcommand" -f -a "man" -d 'View the man page for a given command'
complete -c rustup -n "__fish_use_subcommand" -f -a "self" -d 'Modify the rustup installation'
complete -c rustup -n "__fish_use_subcommand" -f -a "set" -d 'Alter rustup settings'
complete -c rustup -n "__fish_use_subcommand" -f -a "completions" -d 'Generate tab-completion scripts for your shell'
complete -c rustup -n "__fish_use_subcommand" -f -a "help" -d 'Prints this message or the help of the given subcommand(s)'
complete -c rustup -n "__fish_seen_subcommand_from dump-testament" -s h -l help -d 'Prints help information'
complete -c rustup -n "__fish_seen_subcommand_from dump-testament" -s V -l version -d 'Prints version information'
complete -c rustup -n "__fish_seen_subcommand_from show" -s v -l verbose -d 'Enable verbose output with rustc information for all installed toolchains'
complete -c rustup -n "__fish_seen_subcommand_from show" -s h -l help -d 'Prints help information'
complete -c rustup -n "__fish_seen_subcommand_from show" -s V -l version -d 'Prints version information'
complete -c rustup -n "__fish_seen_subcommand_from show" -f -a "active-toolchain" -d 'Show the active toolchain'
complete -c rustup -n "__fish_seen_subcommand_from show" -f -a "home" -d 'Display the computed value of RUSTUP_HOME'
complete -c rustup -n "__fish_seen_subcommand_from show" -f -a "profile" -d 'Show the current profile'
complete -c rustup -n "__fish_seen_subcommand_from show" -f -a "keys" -d 'Display the known PGP keys'
complete -c rustup -n "__fish_seen_subcommand_from show" -f -a "help" -d 'Prints this message or the help of the given subcommand(s)'
complete -c rustup -n "__fish_seen_subcommand_from active-toolchain" -s v -l verbose -d 'Enable verbose output with rustc information'
complete -c rustup -n "__fish_seen_subcommand_from active-toolchain" -s h -l help -d 'Prints help information'
complete -c rustup -n "__fish_seen_subcommand_from active-toolchain" -s V -l version -d 'Prints version information'
complete -c rustup -n "__fish_seen_subcommand_from home" -s h -l help -d 'Prints help information'
complete -c rustup -n "__fish_seen_subcommand_from home" -s V -l version -d 'Prints version information'
complete -c rustup -n "__fish_seen_subcommand_from profile" -s h -l help -d 'Prints help information'
complete -c rustup -n "__fish_seen_subcommand_from profile" -s V -l version -d 'Prints version information'
complete -c rustup -n "__fish_seen_subcommand_from keys" -s h -l help -d 'Prints help information'
complete -c rustup -n "__fish_seen_subcommand_from keys" -s V -l version -d 'Prints version information'
complete -c rustup -n "__fish_seen_subcommand_from help" -s h -l help -d 'Prints help information'
complete -c rustup -n "__fish_seen_subcommand_from help" -s V -l version -d 'Prints version information'
complete -c rustup -n "__fish_seen_subcommand_from install" -l profile -r -f -a "minimal default complete"
complete -c rustup -n "__fish_seen_subcommand_from install" -l no-self-update -d 'Don\'t perform self-update when running the `rustup install` command'
complete -c rustup -n "__fish_seen_subcommand_from install" -l force -d 'Force an update, even if some components are missing'
complete -c rustup -n "__fish_seen_subcommand_from install" -l force-non-host -d 'Install toolchains that require an emulator. See https://github.com/rust-lang/rustup/wiki/Non-host-toolchains'
complete -c rustup -n "__fish_seen_subcommand_from install" -s h -l help -d 'Prints help information'
complete -c rustup -n "__fish_seen_subcommand_from install" -s V -l version -d 'Prints version information'
complete -c rustup -n "__fish_seen_subcommand_from uninstall" -s h -l help -d 'Prints help information'
complete -c rustup -n "__fish_seen_subcommand_from uninstall" -s V -l version -d 'Prints version information'
complete -c rustup -n "__fish_seen_subcommand_from update" -l no-self-update -d 'Don\'t perform self update when running the `rustup update` command'
complete -c rustup -n "__fish_seen_subcommand_from update" -l force -d 'Force an update, even if some components are missing'
complete -c rustup -n "__fish_seen_subcommand_from update" -l force-non-host -d 'Install toolchains that require an emulator. See https://github.com/rust-lang/rustup/wiki/Non-host-toolchains'
complete -c rustup -n "__fish_seen_subcommand_from update" -s h -l help -d 'Prints help information'
complete -c rustup -n "__fish_seen_subcommand_from update" -s V -l version -d 'Prints version information'
complete -c rustup -n "__fish_seen_subcommand_from check" -s h -l help -d 'Prints help information'
complete -c rustup -n "__fish_seen_subcommand_from check" -s V -l version -d 'Prints version information'
complete -c rustup -n "__fish_seen_subcommand_from default" -s h -l help -d 'Prints help information'
complete -c rustup -n "__fish_seen_subcommand_from default" -s V -l version -d 'Prints version information'
complete -c rustup -n "__fish_seen_subcommand_from toolchain" -s h -l help -d 'Prints help information'
complete -c rustup -n "__fish_seen_subcommand_from toolchain" -s V -l version -d 'Prints version information'
complete -c rustup -n "__fish_seen_subcommand_from toolchain" -f -a "list" -d 'List installed toolchains'
complete -c rustup -n "__fish_seen_subcommand_from toolchain" -f -a "install" -d 'Install or update a given toolchain'
complete -c rustup -n "__fish_seen_subcommand_from toolchain" -f -a "uninstall" -d 'Uninstall a toolchain'
complete -c rustup -n "__fish_seen_subcommand_from toolchain" -f -a "link" -d 'Create a custom toolchain by symlinking to a directory'
complete -c rustup -n "__fish_seen_subcommand_from toolchain" -f -a "help" -d 'Prints this message or the help of the given subcommand(s)'
complete -c rustup -n "__fish_seen_subcommand_from list" -s v -l verbose -d 'Enable verbose output with toolchain information'
complete -c rustup -n "__fish_seen_subcommand_from list" -s h -l help -d 'Prints help information'
complete -c rustup -n "__fish_seen_subcommand_from list" -s V -l version -d 'Prints version information'
complete -c rustup -n "__fish_seen_subcommand_from install" -l profile -r -f -a "minimal default complete"
complete -c rustup -n "__fish_seen_subcommand_from install" -s c -l component -d 'Add specific components on installation'
complete -c rustup -n "__fish_seen_subcommand_from install" -s t -l target -d 'Add specific targets on installation'
complete -c rustup -n "__fish_seen_subcommand_from install" -l no-self-update -d 'Don\'t perform self update when running the`rustup toolchain install` command'
complete -c rustup -n "__fish_seen_subcommand_from install" -l force -d 'Force an update, even if some components are missing'
complete -c rustup -n "__fish_seen_subcommand_from install" -l allow-downgrade -d 'Allow rustup to downgrade the toolchain to satisfy your component choice'
complete -c rustup -n "__fish_seen_subcommand_from install" -l force-non-host -d 'Install toolchains that require an emulator. See https://github.com/rust-lang/rustup/wiki/Non-host-toolchains'
complete -c rustup -n "__fish_seen_subcommand_from install" -s h -l help -d 'Prints help information'
complete -c rustup -n "__fish_seen_subcommand_from install" -s V -l version -d 'Prints version information'
complete -c rustup -n "__fish_seen_subcommand_from uninstall" -s h -l help -d 'Prints help information'
complete -c rustup -n "__fish_seen_subcommand_from uninstall" -s V -l version -d 'Prints version information'
complete -c rustup -n "__fish_seen_subcommand_from link" -s h -l help -d 'Prints help information'
complete -c rustup -n "__fish_seen_subcommand_from link" -s V -l version -d 'Prints version information'
complete -c rustup -n "__fish_seen_subcommand_from help" -s h -l help -d 'Prints help information'
complete -c rustup -n "__fish_seen_subcommand_from help" -s V -l version -d 'Prints version information'
complete -c rustup -n "__fish_seen_subcommand_from target" -s h -l help -d 'Prints help information'
complete -c rustup -n "__fish_seen_subcommand_from target" -s V -l version -d 'Prints version information'
complete -c rustup -n "__fish_seen_subcommand_from target" -f -a "list" -d 'List installed and available targets'
complete -c rustup -n "__fish_seen_subcommand_from target" -f -a "add" -d 'Add a target to a Rust toolchain'
complete -c rustup -n "__fish_seen_subcommand_from target" -f -a "remove" -d 'Remove a target from a Rust toolchain'
complete -c rustup -n "__fish_seen_subcommand_from target" -f -a "help" -d 'Prints this message or the help of the given subcommand(s)'
complete -c rustup -n "__fish_seen_subcommand_from list" -l toolchain -d 'Toolchain name, such as \'stable\', \'nightly\', or \'1.8.0\'. For more information see `rustup help toolchain`'
complete -c rustup -n "__fish_seen_subcommand_from list" -l installed -d 'List only installed targets'
complete -c rustup -n "__fish_seen_subcommand_from list" -s h -l help -d 'Prints help information'
complete -c rustup -n "__fish_seen_subcommand_from list" -s V -l version -d 'Prints version information'
complete -c rustup -n "__fish_seen_subcommand_from add" -l toolchain -d 'Toolchain name, such as \'stable\', \'nightly\', or \'1.8.0\'. For more information see `rustup help toolchain`'
complete -c rustup -n "__fish_seen_subcommand_from add" -s h -l help -d 'Prints help information'
complete -c rustup -n "__fish_seen_subcommand_from add" -s V -l version -d 'Prints version information'
complete -c rustup -n "__fish_seen_subcommand_from remove" -l toolchain -d 'Toolchain name, such as \'stable\', \'nightly\', or \'1.8.0\'. For more information see `rustup help toolchain`'
complete -c rustup -n "__fish_seen_subcommand_from remove" -s h -l help -d 'Prints help information'
complete -c rustup -n "__fish_seen_subcommand_from remove" -s V -l version -d 'Prints version information'
complete -c rustup -n "__fish_seen_subcommand_from help" -s h -l help -d 'Prints help information'
complete -c rustup -n "__fish_seen_subcommand_from help" -s V -l version -d 'Prints version information'
complete -c rustup -n "__fish_seen_subcommand_from component" -s h -l help -d 'Prints help information'
complete -c rustup -n "__fish_seen_subcommand_from component" -s V -l version -d 'Prints version information'
complete -c rustup -n "__fish_seen_subcommand_from component" -f -a "list" -d 'List installed and available components'
complete -c rustup -n "__fish_seen_subcommand_from component" -f -a "add" -d 'Add a component to a Rust toolchain'
complete -c rustup -n "__fish_seen_subcommand_from component" -f -a "remove" -d 'Remove a component from a Rust toolchain'
complete -c rustup -n "__fish_seen_subcommand_from component" -f -a "help" -d 'Prints this message or the help of the given subcommand(s)'
complete -c rustup -n "__fish_seen_subcommand_from list" -l toolchain -d 'Toolchain name, such as \'stable\', \'nightly\', or \'1.8.0\'. For more information see `rustup help toolchain`'
complete -c rustup -n "__fish_seen_subcommand_from list" -l installed -d 'List only installed components'
complete -c rustup -n "__fish_seen_subcommand_from list" -s h -l help -d 'Prints help information'
complete -c rustup -n "__fish_seen_subcommand_from list" -s V -l version -d 'Prints version information'
complete -c rustup -n "__fish_seen_subcommand_from add" -l toolchain -d 'Toolchain name, such as \'stable\', \'nightly\', or \'1.8.0\'. For more information see `rustup help toolchain`'
complete -c rustup -n "__fish_seen_subcommand_from add" -l target
complete -c rustup -n "__fish_seen_subcommand_from add" -s h -l help -d 'Prints help information'
complete -c rustup -n "__fish_seen_subcommand_from add" -s V -l version -d 'Prints version information'
complete -c rustup -n "__fish_seen_subcommand_from remove" -l toolchain -d 'Toolchain name, such as \'stable\', \'nightly\', or \'1.8.0\'. For more information see `rustup help toolchain`'
complete -c rustup -n "__fish_seen_subcommand_from remove" -l target
complete -c rustup -n "__fish_seen_subcommand_from remove" -s h -l help -d 'Prints help information'
complete -c rustup -n "__fish_seen_subcommand_from remove" -s V -l version -d 'Prints version information'
complete -c rustup -n "__fish_seen_subcommand_from help" -s h -l help -d 'Prints help information'
complete -c rustup -n "__fish_seen_subcommand_from help" -s V -l version -d 'Prints version information'
complete -c rustup -n "__fish_seen_subcommand_from override" -s h -l help -d 'Prints help information'
complete -c rustup -n "__fish_seen_subcommand_from override" -s V -l version -d 'Prints version information'
complete -c rustup -n "__fish_seen_subcommand_from override" -f -a "list" -d 'List directory toolchain overrides'
complete -c rustup -n "__fish_seen_subcommand_from override" -f -a "set" -d 'Set the override toolchain for a directory'
complete -c rustup -n "__fish_seen_subcommand_from override" -f -a "unset" -d 'Remove the override toolchain for a directory'
complete -c rustup -n "__fish_seen_subcommand_from override" -f -a "help" -d 'Prints this message or the help of the given subcommand(s)'
complete -c rustup -n "__fish_seen_subcommand_from list" -s h -l help -d 'Prints help information'
complete -c rustup -n "__fish_seen_subcommand_from list" -s V -l version -d 'Prints version information'
complete -c rustup -n "__fish_seen_subcommand_from set" -l path -d 'Path to the directory'
complete -c rustup -n "__fish_seen_subcommand_from set" -s h -l help -d 'Prints help information'
complete -c rustup -n "__fish_seen_subcommand_from set" -s V -l version -d 'Prints version information'
complete -c rustup -n "__fish_seen_subcommand_from unset" -l path -d 'Path to the directory'
complete -c rustup -n "__fish_seen_subcommand_from unset" -l nonexistent -d 'Remove override toolchain for all nonexistent directories'
complete -c rustup -n "__fish_seen_subcommand_from unset" -s h -l help -d 'Prints help information'
complete -c rustup -n "__fish_seen_subcommand_from unset" -s V -l version -d 'Prints version information'
complete -c rustup -n "__fish_seen_subcommand_from help" -s h -l help -d 'Prints help information'
complete -c rustup -n "__fish_seen_subcommand_from help" -s V -l version -d 'Prints version information'
complete -c rustup -n "__fish_seen_subcommand_from run" -l install -d 'Install the requested toolchain if needed'
complete -c rustup -n "__fish_seen_subcommand_from run" -s h -l help -d 'Prints help information'
complete -c rustup -n "__fish_seen_subcommand_from run" -s V -l version -d 'Prints version information'
complete -c rustup -n "__fish_seen_subcommand_from which" -l toolchain -d 'Toolchain name, such as \'stable\', \'nightly\', or \'1.8.0\'. For more information see `rustup help toolchain`'
complete -c rustup -n "__fish_seen_subcommand_from which" -s h -l help -d 'Prints help information'
complete -c rustup -n "__fish_seen_subcommand_from which" -s V -l version -d 'Prints version information'
complete -c rustup -n "__fish_seen_subcommand_from doc" -l toolchain -d 'Toolchain name, such as \'stable\', \'nightly\', or \'1.8.0\'. For more information see `rustup help toolchain`'
complete -c rustup -n "__fish_seen_subcommand_from doc" -l path -d 'Only print the path to the documentation'
complete -c rustup -n "__fish_seen_subcommand_from doc" -l alloc -d 'The Rust core allocation and collections library'
complete -c rustup -n "__fish_seen_subcommand_from doc" -l book -d 'The Rust Programming Language book'
complete -c rustup -n "__fish_seen_subcommand_from doc" -l cargo -d 'The Cargo Book'
complete -c rustup -n "__fish_seen_subcommand_from doc" -l core -d 'The Rust Core Library'
complete -c rustup -n "__fish_seen_subcommand_from doc" -l edition-guide -d 'The Rust Edition Guide'
complete -c rustup -n "__fish_seen_subcommand_from doc" -l nomicon -d 'The Dark Arts of Advanced and Unsafe Rust Programming'
complete -c rustup -n "__fish_seen_subcommand_from doc" -l proc_macro -d 'A support library for macro authors when defining new macros'
complete -c rustup -n "__fish_seen_subcommand_from doc" -l reference -d 'The Rust Reference'
complete -c rustup -n "__fish_seen_subcommand_from doc" -l rust-by-example -d 'A collection of runnable examples that illustrate various Rust concepts and standard libraries'
complete -c rustup -n "__fish_seen_subcommand_from doc" -l rustc -d 'The compiler for the Rust programming language'
complete -c rustup -n "__fish_seen_subcommand_from doc" -l rustdoc -d 'Generate documentation for Rust projects'
complete -c rustup -n "__fish_seen_subcommand_from doc" -l std -d 'Standard library API documentation'
complete -c rustup -n "__fish_seen_subcommand_from doc" -l test -d 'Support code for rustc\'s built in unit-test and micro-benchmarking framework'
complete -c rustup -n "__fish_seen_subcommand_from doc" -l unstable-book -d 'The Unstable Book'
complete -c rustup -n "__fish_seen_subcommand_from doc" -l embedded-book -d 'The Embedded Rust Book'
complete -c rustup -n "__fish_seen_subcommand_from doc" -s h -l help -d 'Prints help information'
complete -c rustup -n "__fish_seen_subcommand_from doc" -s V -l version -d 'Prints version information'
complete -c rustup -n "__fish_seen_subcommand_from man" -l toolchain -d 'Toolchain name, such as \'stable\', \'nightly\', or \'1.8.0\'. For more information see `rustup help toolchain`'
complete -c rustup -n "__fish_seen_subcommand_from man" -s h -l help -d 'Prints help information'
complete -c rustup -n "__fish_seen_subcommand_from man" -s V -l version -d 'Prints version information'
complete -c rustup -n "__fish_seen_subcommand_from self" -s h -l help -d 'Prints help information'
complete -c rustup -n "__fish_seen_subcommand_from self" -s V -l version -d 'Prints version information'
complete -c rustup -n "__fish_seen_subcommand_from self" -f -a "update" -d 'Download and install updates to rustup'
complete -c rustup -n "__fish_seen_subcommand_from self" -f -a "uninstall" -d 'Uninstall rustup.'
complete -c rustup -n "__fish_seen_subcommand_from self" -f -a "upgrade-data" -d 'Upgrade the internal data format.'
complete -c rustup -n "__fish_seen_subcommand_from self" -f -a "help" -d 'Prints this message or the help of the given subcommand(s)'
complete -c rustup -n "__fish_seen_subcommand_from update" -s h -l help -d 'Prints help information'
complete -c rustup -n "__fish_seen_subcommand_from update" -s V -l version -d 'Prints version information'
complete -c rustup -n "__fish_seen_subcommand_from uninstall" -s y
complete -c rustup -n "__fish_seen_subcommand_from uninstall" -s h -l help -d 'Prints help information'
complete -c rustup -n "__fish_seen_subcommand_from uninstall" -s V -l version -d 'Prints version information'
complete -c rustup -n "__fish_seen_subcommand_from upgrade-data" -s h -l help -d 'Prints help information'
complete -c rustup -n "__fish_seen_subcommand_from upgrade-data" -s V -l version -d 'Prints version information'
complete -c rustup -n "__fish_seen_subcommand_from help" -s h -l help -d 'Prints help information'
complete -c rustup -n "__fish_seen_subcommand_from help" -s V -l version -d 'Prints version information'
complete -c rustup -n "__fish_seen_subcommand_from set" -s h -l help -d 'Prints help information'
complete -c rustup -n "__fish_seen_subcommand_from set" -s V -l version -d 'Prints version information'
complete -c rustup -n "__fish_seen_subcommand_from set" -f -a "default-host" -d 'The triple used to identify toolchains when not specified'
complete -c rustup -n "__fish_seen_subcommand_from set" -f -a "profile" -d 'The default components installed'
complete -c rustup -n "__fish_seen_subcommand_from set" -f -a "auto-self-update" -d 'The rustup auto self update mode'
complete -c rustup -n "__fish_seen_subcommand_from set" -f -a "help" -d 'Prints this message or the help of the given subcommand(s)'
complete -c rustup -n "__fish_seen_subcommand_from default-host" -s h -l help -d 'Prints help information'
complete -c rustup -n "__fish_seen_subcommand_from default-host" -s V -l version -d 'Prints version information'
complete -c rustup -n "__fish_seen_subcommand_from profile" -s h -l help -d 'Prints help information'
complete -c rustup -n "__fish_seen_subcommand_from profile" -s V -l version -d 'Prints version information'
complete -c rustup -n "__fish_seen_subcommand_from auto-self-update" -s h -l help -d 'Prints help information'
complete -c rustup -n "__fish_seen_subcommand_from auto-self-update" -s V -l version -d 'Prints version information'
complete -c rustup -n "__fish_seen_subcommand_from help" -s h -l help -d 'Prints help information'
complete -c rustup -n "__fish_seen_subcommand_from help" -s V -l version -d 'Prints version information'
complete -c rustup -n "__fish_seen_subcommand_from completions" -s h -l help -d 'Prints help information'
complete -c rustup -n "__fish_seen_subcommand_from completions" -s V -l version -d 'Prints version information'
complete -c rustup -n "__fish_seen_subcommand_from help" -s h -l help -d 'Prints help information'
complete -c rustup -n "__fish_seen_subcommand_from help" -s V -l version -d 'Prints version information'

1070
.config/fish/conf.d/bin/git-forgit Executable file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,54 @@
# MIT (c) Chris Apple
set -l install_dir (dirname (status dirname))
set -x FORGIT_INSTALL_DIR "$install_dir/conf.d"
set -x FORGIT "$FORGIT_INSTALL_DIR/bin/git-forgit"
if not test -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
# alias `git-forgit` to the full-path of the command
alias git-forgit "$FORGIT"
# register abbreviations
if test -z "$FORGIT_NO_ALIASES"
abbr -a -- (string collect $forgit_add; or string collect "ga") git-forgit add
abbr -a -- (string collect $forgit_reset_head; or string collect "grh") git-forgit reset_head
abbr -a -- (string collect $forgit_log; or string collect "glo") git-forgit log
abbr -a -- (string collect $forgit_reflog; or string collect "grl") git-forgit reflog
abbr -a -- (string collect $forgit_diff; or string collect "gd") git-forgit diff
abbr -a -- (string collect $forgit_ignore; or string collect "gi") git-forgit ignore
abbr -a -- (string collect $forgit_checkout_file; or string collect "gcf") git-forgit checkout_file
abbr -a -- (string collect $forgit_checkout_branch; or string collect "gcb") git-forgit checkout_branch
abbr -a -- (string collect $forgit_branch_delete; or string collect "gbd") git-forgit branch_delete
abbr -a -- (string collect $forgit_clean; or string collect "gclean") git-forgit clean
abbr -a -- (string collect $forgit_stash_show; or string collect "gss") git-forgit stash_show
abbr -a -- (string collect $forgit_stash_push; or string collect "gsp") git-forgit stash_push
abbr -a -- (string collect $forgit_cherry_pick; or string collect "gcp") git-forgit cherry_pick_from_branch
abbr -a -- (string collect $forgit_rebase; or string collect "grb") git-forgit rebase
abbr -a -- (string collect $forgit_fixup; or string collect "gfu") git-forgit fixup
abbr -a -- (string collect $forgit_checkout_commit; or string collect "gco") git-forgit checkout_commit
abbr -a -- (string collect $forgit_revert_commit; or string collect "grc") git-forgit revert_commit
abbr -a -- (string collect $forgit_blame; or string collect "gbl") git-forgit blame
abbr -a -- (string collect $forgit_checkout_tag; or string collect "gct") git-forgit checkout_tag
end

View file

@ -0,0 +1,10 @@
# Remove legacy hooks to prevent errors when upgrading.
# This can be removed when we cleanup other universal abbr code.
functions -e _git_install _git_update _git_uninstall
# fisher initialization, protected as omf also tries to run it.
set -q fisher_path; or set -l fisher_path $__fish_config_dir
if test -f $fisher_path/functions/__git.init.fish
source $fisher_path/functions/__git.init.fish
__git.init
end

View file

@ -0,0 +1,28 @@
set --query nvm_mirror || set --global nvm_mirror https://nodejs.org/dist
set --query XDG_DATA_HOME || set --local XDG_DATA_HOME ~/.local/share
set --global nvm_data $XDG_DATA_HOME/nvm
function _nvm_install --on-event nvm_install
test ! -d $nvm_data && command mkdir -p $nvm_data
echo "Downloading the Node distribution index..." 2>/dev/null
_nvm_index_update
end
function _nvm_update --on-event nvm_update
set --query --universal nvm_data && set --erase --universal nvm_data
set --query --universal nvm_mirror && set --erase --universal nvm_mirror
set --query nvm_mirror || set --global nvm_mirror https://nodejs.org/dist
end
function _nvm_uninstall --on-event nvm_uninstall
command rm -rf $nvm_data
set --query nvm_current_version && _nvm_version_deactivate $nvm_current_version
set --names | string replace --filter --regex -- "^nvm" "set --erase nvm" | source
functions --erase (functions --all | string match --entire --regex -- "^_nvm_")
end
if status is-interactive && set --query nvm_default_version && ! set --query nvm_current_version
nvm use --silent $nvm_default_version
end

View file

@ -0,0 +1 @@
source "$HOME/.cargo/env.fish"

View file

@ -0,0 +1,5 @@
if status --is-login
if test (tty) = /dev/tty1
exec sway
end
end

18
.config/fish/config.fish Normal file
View file

@ -0,0 +1,18 @@
set fish_greeting
set -gx EDITOR nvim
fx --comp fish | source
zoxide init fish | source
fzf --fish | source
# bun
set --export BUN_INSTALL "$HOME/.bun"
set --export PATH $BUN_INSTALL/bin $PATH
# scripts
set --export PATH ~/.scripts/ $PATH
source ~/.config/fish/env.fish

View file

@ -0,0 +1,5 @@
jorgebucaran/fisher
jhillyerd/plugin-git
jorgebucaran/nvm.fish
wfxr/forgit
berk-karaal/loadenv.fish

View file

@ -0,0 +1,3 @@
function __git.branch_has_wip -d "Returns 0 if branch has --wip--, otherwise 1"
git log -n 1 2>/dev/null | grep -qc "\-\-wip\-\-"
end

View file

@ -0,0 +1,6 @@
function __git.current_branch -d "Output git's current branch name"
begin
git symbolic-ref HEAD; or \
git rev-parse --short HEAD; or return
end 2>/dev/null | sed -e 's|^refs/heads/||'
end

View file

@ -0,0 +1,11 @@
function __git.default_branch -d "Use init.defaultBranch if it's set and exists, otherwise use main if it exists. Falls back to master"
command git rev-parse --git-dir &>/dev/null; or return
if set -l default_branch (command git config --get init.defaultBranch)
and command git show-ref -q --verify refs/heads/{$default_branch}
echo $default_branch
else if command git show-ref -q --verify refs/heads/main
echo main
else
echo master
end
end

View file

@ -0,0 +1,7 @@
function __git.destroy
for ab in $__git_plugin_abbreviations
abbr -e $ab
end
set -Ue __git_plugin_abbreviations
set -Ue __git_plugin_initialized
end

View file

@ -0,0 +1,200 @@
function __git.init
function __git.create_abbr -d "Create Git plugin abbreviation"
set -l name $argv[1]
set -l body $argv[2..-1]
# TODO: global scope abbr will be default in fish 3.6.0
abbr -a -g $name $body
end
# Provide a smooth transition from universal to global abbreviations by
# deleting the old univeral ones. Can be removed after fish 3.6 is in
# wide-spread use, i.e. 2024. __git.destroy should also be removed
# at the same time.
if set -q __git_plugin_initialized
__git.destroy
end
# git abbreviations
__git.create_abbr g git
__git.create_abbr ga git add
__git.create_abbr gaa git add --all
__git.create_abbr gau git add --update
__git.create_abbr gapa git add --patch
__git.create_abbr gap git apply
__git.create_abbr gb git branch -vv
__git.create_abbr gba git branch -a -v
__git.create_abbr gban git branch -a -v --no-merged
__git.create_abbr gbd git branch -d
__git.create_abbr gbD git branch -D
__git.create_abbr ggsup git branch --set-upstream-to=origin/\(__git.current_branch\)
__git.create_abbr gbl git blame -b -w
__git.create_abbr gbs git bisect
__git.create_abbr gbsb git bisect bad
__git.create_abbr gbsg git bisect good
__git.create_abbr gbsr git bisect reset
__git.create_abbr gbss git bisect start
__git.create_abbr gc git commit -v
__git.create_abbr gc! git commit -v --amend
__git.create_abbr gcn! git commit -v --no-edit --amend
__git.create_abbr gca git commit -v -a
__git.create_abbr gca! git commit -v -a --amend
__git.create_abbr gcan! git commit -v -a --no-edit --amend
__git.create_abbr gcv git commit -v --no-verify
__git.create_abbr gcav git commit -a -v --no-verify
__git.create_abbr gcav! git commit -a -v --no-verify --amend
__git.create_abbr gcm git commit -m
__git.create_abbr gcam git commit -a -m
__git.create_abbr gcs git commit -S
__git.create_abbr gscam git commit -S -a -m
__git.create_abbr gcfx git commit --fixup
__git.create_abbr gcf git config --list
__git.create_abbr gcl git clone
__git.create_abbr gclean git clean -di
__git.create_abbr gclean! git clean -dfx
__git.create_abbr gclean!! "git reset --hard; and git clean -dfx"
__git.create_abbr gcount git shortlog -sn
__git.create_abbr gcp git cherry-pick
__git.create_abbr gcpa git cherry-pick --abort
__git.create_abbr gcpc git cherry-pick --continue
__git.create_abbr gd git diff
__git.create_abbr gdca git diff --cached
__git.create_abbr gds git diff --stat
__git.create_abbr gdsc git diff --stat --cached
__git.create_abbr gdt git diff-tree --no-commit-id --name-only -r
__git.create_abbr gdw git diff --word-diff
__git.create_abbr gdwc git diff --word-diff --cached
__git.create_abbr gdto git difftool
__git.create_abbr gignore git update-index --assume-unchanged
__git.create_abbr gf git fetch
__git.create_abbr gfa git fetch --all --prune
__git.create_abbr gfm "git fetch origin (__git.default_branch) --prune; and git merge FETCH_HEAD"
__git.create_abbr gfo git fetch origin
__git.create_abbr gl git pull
__git.create_abbr ggl git pull origin \(__git.current_branch\)
__git.create_abbr gll git pull origin
__git.create_abbr glr git pull --rebase
__git.create_abbr glg git log --stat
__git.create_abbr glgg git log --graph
__git.create_abbr glgga git log --graph --decorate --all
__git.create_abbr glo git log --oneline --decorate --color
__git.create_abbr glog git log --oneline --decorate --color --graph
__git.create_abbr gloga git log --oneline --decorate --color --graph --all
__git.create_abbr glom git log --oneline --decorate --color \(__git.default_branch\)..
__git.create_abbr glod git log --oneline --decorate --color develop..
__git.create_abbr gloo "git log --pretty=format:'%C(yellow)%h %Cred%ad %Cblue%an%Cgreen%d %Creset%s' --date=short"
__git.create_abbr gm git merge
__git.create_abbr gmt git mergetool --no-prompt
__git.create_abbr gmom git merge origin/\(__git.default_branch\)
__git.create_abbr gp git push
__git.create_abbr gp! git push --force-with-lease
__git.create_abbr gpo git push origin
__git.create_abbr gpo! git push --force-with-lease origin
__git.create_abbr gpv git push --no-verify
__git.create_abbr gpv! git push --no-verify --force-with-lease
__git.create_abbr ggp git push origin \(__git.current_branch\)
__git.create_abbr ggp! git push origin \(__git.current_branch\) --force-with-lease
__git.create_abbr gpu git push origin \(__git.current_branch\) --set-upstream
__git.create_abbr gpoat "git push origin --all; and git push origin --tags"
__git.create_abbr ggpnp "git pull origin (__git.current_branch); and git push origin (__git.current_branch)"
__git.create_abbr gr git remote -vv
__git.create_abbr gra git remote add
__git.create_abbr grb git rebase
__git.create_abbr grba git rebase --abort
__git.create_abbr grbc git rebase --continue
__git.create_abbr grbi git rebase --interactive
__git.create_abbr grbm git rebase \(__git.default_branch\)
__git.create_abbr grbmi git rebase \(__git.default_branch\) --interactive
__git.create_abbr grbmia git rebase \(__git.default_branch\) --interactive --autosquash
__git.create_abbr grbom "git fetch origin (__git.default_branch); and git rebase FETCH_HEAD"
__git.create_abbr grbomi "git fetch origin (__git.default_branch); and git rebase FETCH_HEAD --interactive"
__git.create_abbr grbomia "git fetch origin (__git.default_branch); and git rebase FETCH_HEAD --interactive --autosquash"
__git.create_abbr grbd git rebase develop
__git.create_abbr grbdi git rebase develop --interactive
__git.create_abbr grbdia git rebase develop --interactive --autosquash
__git.create_abbr grbs git rebase --skip
__git.create_abbr ggu git pull --rebase origin \(__git.current_branch\)
__git.create_abbr grev git revert
__git.create_abbr grh git reset
__git.create_abbr grhh git reset --hard
__git.create_abbr grhpa git reset --patch
__git.create_abbr grm git rm
__git.create_abbr grmc git rm --cached
__git.create_abbr grmv git remote rename
__git.create_abbr grpo git remote prune origin
__git.create_abbr grrm git remote remove
__git.create_abbr grs git restore
__git.create_abbr grset git remote set-url
__git.create_abbr grss git restore --source
__git.create_abbr grst git restore --staged
__git.create_abbr grup git remote update
__git.create_abbr grv git remote -v
__git.create_abbr gsh git show
__git.create_abbr gsd git svn dcommit
__git.create_abbr gsr git svn rebase
__git.create_abbr gsb git status -sb
__git.create_abbr gss git status -s
__git.create_abbr gst git status
__git.create_abbr gsta git stash
__git.create_abbr gstd git stash drop
__git.create_abbr gstl git stash list
__git.create_abbr gstp git stash pop
__git.create_abbr gsts git stash show --text
__git.create_abbr gsu git submodule update
__git.create_abbr gsur git submodule update --recursive
__git.create_abbr gsuri git submodule update --recursive --init
__git.create_abbr gts git tag -s
__git.create_abbr gtv git tag | sort -V
__git.create_abbr gsw git switch
__git.create_abbr gswc git switch --create
__git.create_abbr gunignore git update-index --no-assume-unchanged
__git.create_abbr gup git pull --rebase
__git.create_abbr gupv git pull --rebase -v
__git.create_abbr gupa git pull --rebase --autostash
__git.create_abbr gupav git pull --rebase --autostash -v
__git.create_abbr gwch git whatchanged -p --abbrev-commit --pretty=medium
# git checkout abbreviations
__git.create_abbr gco git checkout
__git.create_abbr gcb git checkout -b
__git.create_abbr gcod git checkout develop
__git.create_abbr gcom git checkout \(__git.default_branch\)
# git flow abbreviations
__git.create_abbr gfb git flow bugfix
__git.create_abbr gff git flow feature
__git.create_abbr gfr git flow release
__git.create_abbr gfh git flow hotfix
__git.create_abbr gfs git flow support
__git.create_abbr gfbs git flow bugfix start
__git.create_abbr gffs git flow feature start
__git.create_abbr gfrs git flow release start
__git.create_abbr gfhs git flow hotfix start
__git.create_abbr gfss git flow support start
__git.create_abbr gfbt git flow bugfix track
__git.create_abbr gfft git flow feature track
__git.create_abbr gfrt git flow release track
__git.create_abbr gfht git flow hotfix track
__git.create_abbr gfst git flow support track
__git.create_abbr gfp git flow publish
# git worktree abbreviations
__git.create_abbr gwt git worktree
__git.create_abbr gwta git worktree add
__git.create_abbr gwtls git worktree list
__git.create_abbr gwtlo git worktree lock
__git.create_abbr gwtmv git worktree move
__git.create_abbr gwtpr git worktree prune
__git.create_abbr gwtrm git worktree remove
__git.create_abbr gwtulo git worktree unlock
# GitLab push options
__git.create_abbr gmr git push origin \(__git.current_branch\) --set-upstream -o merge_request.create
__git.create_abbr gmwps git push origin \(__git.current_branch\) --set-upstream -o merge_request.create -o merge_request.merge_when_pipeline_succeeds
# Cleanup declared functions
functions -e __git.create_abbr
end

View file

@ -0,0 +1,20 @@
function _nvm_index_update
test ! -d $nvm_data && command mkdir -p $nvm_data
set --local index $nvm_data/.index
if not command curl -q --location --silent $nvm_mirror/index.tab >$index.temp
command rm -f $index.temp
echo "nvm: Can't update index, host unavailable: \"$nvm_mirror\"" >&2
return 1
end
command awk -v OFS=\t '
/v0.9.12/ { exit } # Unsupported
NR > 1 {
print $1 (NR == 2 ? " latest" : $10 != "-" ? " lts/" tolower($10) : "")
}
' $index.temp >$index
command rm -f $index.temp
end

View file

@ -0,0 +1,14 @@
function _nvm_list
set --local versions $nvm_data/*
set --query versions[1] &&
string match --entire --regex -- (
string replace --all -- $nvm_data/ "" $versions |
string match --regex -- "v\d.+" |
string escape --style=regex |
string join "|"
) <$nvm_data/.index
command --all node |
string match --quiet --invert --regex -- "^$nvm_data" && echo system
end

View file

@ -0,0 +1,4 @@
function _nvm_version_activate --argument-names ver
set --global --export nvm_current_version $ver
set --prepend PATH $nvm_data/$ver/bin
end

View file

@ -0,0 +1,5 @@
function _nvm_version_deactivate --argument-names ver
test "$nvm_current_version" = "$ver" && set --erase nvm_current_version
set --local index (contains --index -- $nvm_data/$ver/bin $PATH) &&
set --erase PATH[$index]
end

View file

@ -0,0 +1,27 @@
#!/bin/fish
function bw_open --description "Ensure Bitwarden session is valid"
# If no session exists OR session invalid → re-auth
if not bw unlock --check >/dev/null 2>&1
echo "Unlocking Bitwarden..."
# Ask for password only once
if not set -q BW_PASSWORD
read -sP "Bitwarden master password: " BW_PASSWORD
echo
end
# Login if needed
if not bw login --check >/dev/null 2>&1
bw login --raw $argv[1] $BW_PASSWORD >/dev/null
end
# Unlock and store as universal variable
set -Ux BW_SESSION (bw unlock --raw $BW_PASSWORD)
end
echo $BW_SESSION
end

View file

@ -0,0 +1,4 @@
function cfg --wraps='/usr/bin/git --git-dir=$HOME/.cfgstore/ --work-tree=$HOME' --description 'alias cfg=/usr/bin/git --git-dir=$HOME/.cfgstore/ --work-tree=$HOME'
/usr/bin/git --git-dir=$HOME/.cfgstore/ --work-tree=$HOME $argv
end

View file

@ -0,0 +1,90 @@
function fish_prompt
set -l __last_command_exit_status $status
if not set -q -g __fish_arrow_functions_defined
set -g __fish_arrow_functions_defined
function _git_branch_name
set -l branch (git symbolic-ref --quiet HEAD 2>/dev/null)
if set -q branch[1]
echo (string replace -r '^refs/heads/' '' $branch)
else
echo (git rev-parse --short HEAD 2>/dev/null)
end
end
function _is_git_dirty
not command git diff-index --cached --quiet HEAD -- &>/dev/null
or not command git diff --no-ext-diff --quiet --exit-code &>/dev/null
end
function _is_git_repo
type -q git
or return 1
git rev-parse --git-dir >/dev/null 2>&1
end
function _hg_branch_name
echo (hg branch 2>/dev/null)
end
function _is_hg_dirty
set -l stat (hg status -mard 2>/dev/null)
test -n "$stat"
end
function _is_hg_repo
fish_print_hg_root >/dev/null
end
function _repo_branch_name
_$argv[1]_branch_name
end
function _is_repo_dirty
_is_$argv[1]_dirty
end
function _repo_type
if _is_hg_repo
echo hg
return 0
else if _is_git_repo
echo git
return 0
end
return 1
end
end
set -l cyan (set_color -o cyan)
set -l yellow (set_color -o yellow)
set -l red (set_color -o red)
set -l green (set_color -o green)
set -l blue (set_color -o blue)
set -l normal (set_color normal)
set -l arrow_color "$green"
if test $__last_command_exit_status != 0
set arrow_color "$red"
end
set -l arrow "$arrow_color"
if fish_is_root_user
set arrow "$arrow_color# "
end
set -l cwd $cyan(basename (prompt_pwd))
set -l repo_info
if set -l repo_type (_repo_type)
set -l repo_branch $red(_repo_branch_name $repo_type)
set repo_info "$blue $repo_type:($repo_branch$blue)"
if _is_repo_dirty $repo_type
set -l dirty "$yellow"
set repo_info "$repo_info$dirty"
end
end
echo -n -s $arrow ' '$cwd $repo_info $normal ' '
end

View file

@ -0,0 +1,240 @@
function fisher --argument-names cmd --description "A plugin manager for Fish"
set --query fisher_path || set --local fisher_path $__fish_config_dir
set --local fisher_version 4.4.4
set --local fish_plugins $__fish_config_dir/fish_plugins
switch "$cmd"
case -v --version
echo "fisher, version $fisher_version"
case "" -h --help
echo "Usage: fisher install <plugins...> Install plugins"
echo " fisher remove <plugins...> Remove installed plugins"
echo " fisher update <plugins...> Update installed plugins"
echo " fisher update Update all installed plugins"
echo " fisher list [<regex>] List installed plugins matching regex"
echo "Options:"
echo " -v, --version Print version"
echo " -h, --help Print this help message"
echo "Variables:"
echo " \$fisher_path Plugin installation path. Default: $__fish_config_dir" | string replace --regex -- $HOME \~
case ls list
string match --entire --regex -- "$argv[2]" $_fisher_plugins
case install update remove
isatty || read --local --null --array stdin && set --append argv $stdin
set --local install_plugins
set --local update_plugins
set --local remove_plugins
set --local arg_plugins $argv[2..-1]
set --local old_plugins $_fisher_plugins
set --local new_plugins
test -e $fish_plugins && set --local file_plugins (string match --regex -- '^[^\s]+$' <$fish_plugins)
if ! set --query argv[2]
if test "$cmd" != update
echo "fisher: Not enough arguments for command: \"$cmd\"" >&2 && return 1
else if ! set --query file_plugins
echo "fisher: \"$fish_plugins\" file not found: \"$cmd\"" >&2 && return 1
end
set arg_plugins $file_plugins
end
for plugin in $arg_plugins
set plugin (test -e "$plugin" && realpath $plugin || string lower -- $plugin)
contains -- "$plugin" $new_plugins || set --append new_plugins $plugin
end
if set --query argv[2]
for plugin in $new_plugins
if contains -- "$plugin" $old_plugins
test "$cmd" = remove &&
set --append remove_plugins $plugin ||
set --append update_plugins $plugin
else if test "$cmd" = install
set --append install_plugins $plugin
else
echo "fisher: Plugin not installed: \"$plugin\"" >&2 && return 1
end
end
else
for plugin in $new_plugins
contains -- "$plugin" $old_plugins &&
set --append update_plugins $plugin ||
set --append install_plugins $plugin
end
for plugin in $old_plugins
contains -- "$plugin" $new_plugins || set --append remove_plugins $plugin
end
end
set --local pid_list
set --local source_plugins
set --local fetch_plugins $update_plugins $install_plugins
set --local fish_path (status fish-path)
echo (set_color --bold)fisher $cmd version $fisher_version(set_color normal)
for plugin in $fetch_plugins
set --local source (command mktemp -d)
set --append source_plugins $source
command mkdir -p $source/{completions,conf.d,themes,functions}
$fish_path --command "
if test -e $plugin
command cp -Rf $plugin/* $source
else
set temp (command mktemp -d)
set repo (string split -- \@ $plugin) || set repo[2] HEAD
if set path (string replace --regex -- '^(https://)?gitlab.com/' '' \$repo[1])
set name (string split -- / \$path)[-1]
set url https://gitlab.com/\$path/-/archive/\$repo[2]/\$name-\$repo[2].tar.gz
else
set url https://api.github.com/repos/\$repo[1]/tarball/\$repo[2]
end
echo Fetching (set_color --underline)\$url(set_color normal)
if command curl -q --silent -L \$url | command tar -xzC \$temp -f - 2>/dev/null
command cp -Rf \$temp/*/* $source
else
echo fisher: Invalid plugin name or host unavailable: \\\"$plugin\\\" >&2
command rm -rf $source
end
command rm -rf \$temp
end
set files $source/* && string match --quiet --regex -- .+\.fish\\\$ \$files
" &
set --append pid_list (jobs --last --pid)
end
wait $pid_list 2>/dev/null
for plugin in $fetch_plugins
if set --local source $source_plugins[(contains --index -- "$plugin" $fetch_plugins)] && test ! -e $source
if set --local index (contains --index -- "$plugin" $install_plugins)
set --erase install_plugins[$index]
else
set --erase update_plugins[(contains --index -- "$plugin" $update_plugins)]
end
end
end
for plugin in $update_plugins $remove_plugins
if set --local index (contains --index -- "$plugin" $_fisher_plugins)
set --local plugin_files_var _fisher_(string escape --style=var -- $plugin)_files
if contains -- "$plugin" $remove_plugins
for name in (string replace --filter --regex -- '.+/conf\.d/([^/]+)\.fish$' '$1' $$plugin_files_var)
emit {$name}_uninstall
end
printf "%s\n" Removing\ (set_color red --bold)$plugin(set_color normal) " "$$plugin_files_var | string replace -- \~ ~
set --erase _fisher_plugins[$index]
end
command rm -rf (string replace -- \~ ~ $$plugin_files_var)
functions --erase (string replace --filter --regex -- '.+/functions/([^/]+)\.fish$' '$1' $$plugin_files_var)
for name in (string replace --filter --regex -- '.+/completions/([^/]+)\.fish$' '$1' $$plugin_files_var)
complete --erase --command $name
end
set --erase $plugin_files_var
end
end
if set --query update_plugins[1] || set --query install_plugins[1]
command mkdir -p $fisher_path/{functions,themes,conf.d,completions}
end
for plugin in $update_plugins $install_plugins
set --local source $source_plugins[(contains --index -- "$plugin" $fetch_plugins)]
set --local files $source/{functions,themes,conf.d,completions}/*
if set --local index (contains --index -- $plugin $install_plugins)
set --local user_files $fisher_path/{functions,themes,conf.d,completions}/*
set --local conflict_files
for file in (string replace -- $source/ $fisher_path/ $files)
contains -- $file $user_files && set --append conflict_files $file
end
if set --query conflict_files[1] && set --erase install_plugins[$index]
echo -s "fisher: Cannot install \"$plugin\": please remove or move conflicting files first:" \n" "$conflict_files >&2
continue
end
end
for file in (string replace -- $source/ "" $files)
command cp -RLf $source/$file $fisher_path/$file
end
set --local plugin_files_var _fisher_(string escape --style=var -- $plugin)_files
set --query files[1] && set --universal $plugin_files_var (string replace -- $source $fisher_path $files | string replace -- ~ \~)
contains -- $plugin $_fisher_plugins || set --universal --append _fisher_plugins $plugin
contains -- $plugin $install_plugins && set --local event install || set --local event update
printf "%s\n" Installing\ (set_color --bold)$plugin(set_color normal) " "$$plugin_files_var | string replace -- \~ ~
for file in (string match --regex -- '.+/[^/]+\.fish$' $$plugin_files_var | string replace -- \~ ~)
source $file
if set --local name (string replace --regex -- '.+conf\.d/([^/]+)\.fish$' '$1' $file)
emit {$name}_$event
end
end
end
command rm -rf $source_plugins
if set --query _fisher_plugins[1]
set --local commit_plugins
for plugin in $file_plugins
contains -- (string lower -- $plugin) (string lower -- $_fisher_plugins) && set --append commit_plugins $plugin
end
for plugin in $_fisher_plugins
contains -- (string lower -- $plugin) (string lower -- $commit_plugins) || set --append commit_plugins $plugin
end
printf "%s\n" $commit_plugins >$fish_plugins
else
set --erase _fisher_plugins
command rm -f $fish_plugins
end
set --local total (count $install_plugins) (count $update_plugins) (count $remove_plugins)
test "$total" != "0 0 0" && echo (string join ", " (
test $total[1] = 0 || echo "Installed $total[1]") (
test $total[2] = 0 || echo "Updated $total[2]") (
test $total[3] = 0 || echo "Removed $total[3]")
) plugin/s
case \*
echo "fisher: Unknown command: \"$cmd\"" >&2 && return 1
end
end
if ! set --query _fisher_upgraded_to_4_4
set --universal _fisher_upgraded_to_4_4
if functions --query _fisher_list
set --query XDG_DATA_HOME[1] || set --local XDG_DATA_HOME ~/.local/share
command rm -rf $XDG_DATA_HOME/fisher
functions --erase _fisher_{list,plugin_parse}
fisher update >/dev/null 2>/dev/null
else
for var in (set --names | string match --entire --regex '^_fisher_.+_files$')
set $var (string replace -- ~ \~ $$var)
end
functions --erase _fisher_fish_postexec
end
end

View file

@ -0,0 +1,5 @@
function gbage -d "List local branches and display their age"
git for-each-ref --sort=committerdate refs/heads/ \
--format="%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(color:red)%(objectname:short)%(color:reset) - %(contents:subject) - %(authorname) (%(color:green)%(committerdate:relative)%(color:reset))"
end

View file

@ -0,0 +1,14 @@
function gbda -d "Delete all branches merged in current HEAD, including squashed"
git branch --merged | \
command grep -vE '^\*|^\s*(master|main|develop)\s*$' | \
command xargs -r -n 1 git branch -d
set -l default_branch (__git.default_branch)
git for-each-ref refs/heads/ "--format=%(refname:short)" | \
while read branch
set -l merge_base (git merge-base $default_branch $branch)
if string match -q -- '-*' (git cherry $default_branch (git commit-tree (git rev-parse $branch\^{tree}) -p $merge_base -m _))
git branch -D $branch
end
end
end

View file

@ -0,0 +1,3 @@
function gdv -w "git diff -w" -d "Pipe `git diff` to `view` command"
git diff -w $argv | view -
end

View file

@ -0,0 +1,3 @@
function gignored -w 'grep "^[[:lower:]]"' -d "list temporarily ignored files"
git ls-files -v | grep "^[[:lower:]]" $argv
end

View file

@ -0,0 +1,5 @@
function glp -d "git log at requested pretty level" -a format
set -q format[1]; and git log --pretty=$format
end
complete -c glp -x -a "(complete -C 'git log --pretty=' | sed 's/^--pretty=//')"

View file

@ -0,0 +1,11 @@
function grename -d "Rename 'old' branch to 'new', including in origin remote" -a old new
if test (count $argv) -ne 2
echo "Usage: "(status -u)" old_branch new_branch"
return 1
end
git branch -m $old $new
git push origin :$old
and git push --set-upstream origin $new
end
complete -c grename -x -a "(complete -C 'git branch ')"

View file

@ -0,0 +1,3 @@
function grt -d "cd into the top of the current repository or submodule"
cd (git rev-parse --show-toplevel; or echo ".")
end

View file

@ -0,0 +1,21 @@
# gtest: test a command against git staged changes.
#
# example usage:
# gtest make test
function gtest -d "test command on staged changes only"
# Stash working dir, keeping index changes.
git stash push -q --keep-index --include-untracked; or return
# Run test command against index changes only.
command $argv
set cmdstatus $status
# Return working dir and index to original state.
# Note: reset + restore is required to prevent merge conflicts
# when popping the stash.
git reset -q
git restore .
git stash pop -q --index; or return $status
return $cmdstatus
end

View file

@ -0,0 +1,3 @@
function gtl -d "List tags matching prefix" -a prefix
git tag --sort=-v:refname -n -l $prefix\*
end

View file

@ -0,0 +1,7 @@
# Work In Progress (wip)
# These features allow to pause a branch development and switch to another one
# When you want to go back to work, just unwip it
#
function gunwip -d "git uncommit the work-in-progress branch"
git log -n 1 | grep -q -c "\--wip--"; and git reset HEAD~1
end

View file

@ -0,0 +1,7 @@
# Work In Progress (wip)
# These features allow to pause a branch development and switch to another one
# When you want to go back to work, just unwip it
#
function gwip -d "git commit a work-in-progress branch"
git add -A; git rm (git ls-files --deleted) 2> /dev/null; git commit -m "--wip--" --no-verify
end

View file

@ -0,0 +1,4 @@
function lg --wraps=lazygit --description 'alias lg=lazygit'
lazygit $argv
end

View file

@ -0,0 +1,91 @@
function loadenv
builtin argparse h/help print printb U/unload -- $argv
or return 1
if set -q _flag_help
echo "Usage: loadenv [OPTIONS] [FILE]"
echo ""
echo "Export keys and values from a dotenv file."
echo ""
echo "Options:"
echo " --help, -h Show this help message"
echo " --print Print env keys (export preview)"
echo " --printb Print keys with surrounding brackets"
echo " --unload, -U Unexport all keys defined in the dotenv file"
echo ""
echo "Arguments:"
echo " FILE Path to dotenv file (default: .env)"
return 0
end
if test (builtin count $argv) -gt 1
echo "Too many arguments. Only one argument is allowed. Use --help for more information."
return 1
end
set -l dotenv_file ".env"
if test (builtin count $argv) -eq 1
set dotenv_file $argv[1]
end
if not test -f $dotenv_file
echo "Error: File '$dotenv_file' not found in the current directory."
return 1
end
set -l mode load
if set -q _flag_print
set mode print
else if set -q _flag_printb
set mode printb
else if set -q _flag_unload
set mode unload
end
set lineNumber 0
for line in (command cat $dotenv_file)
set lineNumber (math $lineNumber + 1)
# Skip empty lines and comment lines
if string match -qr '^\s*$|^\s*#' $line
continue
end
if not string match -qr '^[A-Za-z_][A-Za-z0-9_]*=' $line
echo "Error: invalid declaration (line $lineNumber): $line"
return 1
end
# Parse key and value
set -l key (string split -m 1 '=' $line)[1]
set -l after_equals_sign (string split -m 1 '=' $line)[2]
set -l value
set -l double_quoted_value_regex '^"(.*)"\s*(?:#.*)*$'
set -l single_quoted_value_regex '^\'(.*)\'\s*(?:#.*)*$'
set -l plain_value_regex '^([^\'"\s]*)\s*(?:#.*)*$'
if string match -qgr $double_quoted_value_regex $after_equals_sign
set value (string match -gr $double_quoted_value_regex $after_equals_sign)
else if string match -qgr $single_quoted_value_regex $after_equals_sign
set value (string match -gr $single_quoted_value_regex $after_equals_sign)
else if string match -qgr $plain_value_regex $after_equals_sign
set value (string match -gr $plain_value_regex $after_equals_sign)
else
echo "Error: invalid value (line $lineNumber): $line"
return 1
end
switch $mode
case print
echo "$key=$value"
case printb
echo "[$key=$value]"
case load
set -gx $key $value
case unload
set -e $key
end
end
end

View file

@ -0,0 +1,234 @@
function nvm --description "Node version manager"
for silent in --silent -s
if set --local index (contains --index -- $silent $argv)
set --erase argv[$index] && break
end
set --erase silent
end
set --local cmd $argv[1]
set --local ver $argv[2]
if set --query silent && ! set --query cmd[1]
echo "nvm: Version number not specified (see nvm -h for usage)" >&2
return 1
end
if ! set --query ver[1] && contains -- "$cmd" install use
for file in .nvmrc .node-version
set file (_nvm_find_up $PWD $file) && read ver <$file && break
end
if ! set --query ver[1]
echo "nvm: Invalid version or missing \".nvmrc\" file" >&2
return 1
end
end
set --local their_version $ver
switch "$cmd"
case -v --version
echo "nvm, version 2.2.16"
case "" -h --help
echo "Usage: nvm install <version> Download and activate the specified Node version"
echo " nvm install Install the version specified in the nearest .nvmrc file"
echo " nvm use <version> Activate the specified Node version in the current shell"
echo " nvm use Activate the version specified in the nearest .nvmrc file"
echo " nvm list List installed Node versions"
echo " nvm list-remote List available Node versions to install"
echo " nvm list-remote <regex> List Node versions matching a given regex pattern"
echo " nvm current Print the currently-active Node version"
echo " nvm uninstall <version> Uninstall the specified Node version"
echo "Options:"
echo " -s, --silent Suppress standard output"
echo " -v, --version Print the version of nvm"
echo " -h, --help Print this help message"
echo "Variables:"
echo " nvm_arch Override architecture, e.g. x64-musl"
echo " nvm_mirror Use a mirror for downloading Node binaries"
echo " nvm_default_version Set the default version for new shells"
echo " nvm_default_packages Install a list of packages every time a Node version is installed"
echo "Examples:"
echo " nvm install latest Install the latest version of Node"
echo " nvm use 14.15.1 Use Node version 14.15.1"
echo " nvm use system Activate the system's Node version"
case install
_nvm_index_update
string match --entire --regex -- (_nvm_version_match $ver) <$nvm_data/.index | read ver alias
if ! set --query ver[1]
echo "nvm: Invalid version number or alias: \"$their_version\"" >&2
return 1
end
if test ! -e $nvm_data/$ver
set --local os (command uname -s | string lower)
set --local ext tar.gz
set --local arch (command uname -m)
switch $os
case aix
set arch ppc64
case sunos
case linux
case darwin
case {MSYS_NT,MINGW\*_NT}\*
set os win
set ext zip
case \*
echo "nvm: Unsupported operating system: \"$os\"" >&2
return 1
end
switch $arch
case i\*86
set arch x86
case x86_64
set arch x64
case arm64
string match --regex --quiet "v(?<major>\d+)" $ver
if test "$os" = darwin -a $major -lt 16
set arch x64
end
case armv6 armv6l
set arch armv6l
case armv7 armv7l
set arch armv7l
case armv8 armv8l aarch64
set arch arm64
end
set --query nvm_arch && set arch $nvm_arch
set --local dir "node-$ver-$os-$arch"
set --local url $nvm_mirror/$ver/$dir.$ext
command mkdir -p $nvm_data/$ver
if ! set --query silent
echo -e "Installing Node \x1b[1m$ver\x1b[22m $alias"
echo -e "Fetching \x1b[4m$url\x1b[24m\x1b[7m"
end
if ! command curl -q $silent --progress-bar --location $url |
command tar --extract --gzip --directory $nvm_data/$ver 2>/dev/null
command rm -rf $nvm_data/$ver
echo -e "\033[F\33[2K\x1b[0mnvm: Invalid mirror or host unavailable: \"$url\"" >&2
return 1
end
set --query silent || echo -en "\033[F\33[2K\x1b[0m"
if test "$os" = win
command mv $nvm_data/$ver/$dir $nvm_data/$ver/bin
else
command mv $nvm_data/$ver/$dir/* $nvm_data/$ver
command rm -rf $nvm_data/$ver/$dir
end
end
if test $ver != "$nvm_current_version"
set --query nvm_current_version && _nvm_version_deactivate $nvm_current_version
_nvm_version_activate $ver
set --query nvm_default_packages[1] && npm install --global $silent $nvm_default_packages
end
set --query silent || printf "Now using Node %s (npm %s) %s\n" (_nvm_node_info)
case use
test $ver = default && set ver $nvm_default_version
_nvm_list | string match --entire --regex -- (_nvm_version_match $ver) | read ver __
if ! set --query ver[1]
echo "nvm: Can't use Node \"$their_version\", version must be installed first" >&2
return 1
end
if test $ver != "$nvm_current_version"
set --query nvm_current_version && _nvm_version_deactivate $nvm_current_version
test $ver != system && _nvm_version_activate $ver
end
set --query silent || printf "Now using Node %s (npm %s) %s\n" (_nvm_node_info)
case uninstall
if test -z "$ver"
echo "nvm: Not enough arguments for command: \"$cmd\"" >&2
return 1
end
test $ver = default && test ! -z "$nvm_default_version" && set ver $nvm_default_version
_nvm_list | string match --entire --regex -- (_nvm_version_match $ver) | read ver __
if ! set -q ver[1]
echo "nvm: Node version not installed or invalid: \"$their_version\"" >&2
return 1
end
set --query silent || printf "Uninstalling Node %s %s\n" $ver (string replace ~ \~ "$nvm_data/$ver/bin/node")
_nvm_version_deactivate $ver
command rm -rf $nvm_data/$ver
case current
_nvm_current
case ls list
_nvm_list | _nvm_list_format (_nvm_current) $argv[2]
case lsr {ls,list}-remote
_nvm_index_update || return
_nvm_list | command awk '
FILENAME == "-" && (is_local[$1] = FNR == NR) { next } {
print $0 (is_local[$1] ? " ✓" : "")
}
' - $nvm_data/.index | _nvm_list_format (_nvm_current) $argv[2]
case \*
echo "nvm: Unknown command or option: \"$cmd\" (see nvm -h for usage)" >&2
return 1
end
end
function _nvm_find_up --argument-names path file
test -e "$path/$file" && echo $path/$file || begin
test ! -z "$path" || return
_nvm_find_up (string replace --regex -- '/[^/]*$' "" $path) $file
end
end
function _nvm_version_match --argument-names ver
string replace --regex -- '^v?(\d+|\d+\.\d+)$' 'v$1.' $ver |
string replace --filter --regex -- '^v?(\d+)' 'v$1' |
string escape --style=regex || string lower '\b'$ver'(?:/\w+)?$'
end
function _nvm_list_format --argument-names current regex
command awk -v current="$current" -v regex="$regex" '
$0 ~ regex {
aliases[versions[i++] = $1] = $2 " " $3
pad = (n = length($1)) > pad ? n : pad
}
END {
if (!i) exit 1
while (i--)
printf((current == versions[i] ? " ▶ " : " ") "%"pad"s %s\n",
versions[i], aliases[versions[i]])
}
'
end
function _nvm_current
command --search --quiet node || return
set --query nvm_current_version && echo $nvm_current_version || echo system
end
function _nvm_node_info
set --local npm_path (string replace bin/npm-cli.js "" (realpath (command --search npm)))
test -f $npm_path/package.json || set --local npm_version_default (command npm --version)
command node --eval "
console.log(process.version)
console.log('$npm_version_default' ? '$npm_version_default': require('$npm_path/package.json').version)
console.log(process.execPath)
" | string replace -- ~ \~
end

View file

@ -0,0 +1,4 @@
function s --wraps='kitten ssh' --description 'alias s=kitten ssh'
kitten ssh $argv
end

View file

@ -0,0 +1,4 @@
function tt --wraps='setfont -d; echo 3 > /sys/class/graphics/fbcon/rotate_all' --description 'alias tt=setfont -d; echo 3 > /sys/class/graphics/fbcon/rotate_all'
setfont -d; echo 3 > /sys/class/graphics/fbcon/rotate_all $argv
end

View file

@ -0,0 +1,4 @@
function v --wraps=nvim --description 'alias v=nvim'
nvim $argv
end

View file

@ -0,0 +1,8 @@
function y
set tmp (mktemp -t "yazi-cwd.XXXXXX")
yazi $argv --cwd-file="$tmp"
if set cwd (command cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ]
builtin cd -- "$cwd"
end
rm -f -- "$tmp"
end

618
.config/lazygit/config.yml Normal file
View file

@ -0,0 +1,618 @@
# Config relating to the Lazygit UI
gui:
# See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#custom-author-color
authorColors: {}
# See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#custom-branch-color
branchColorPatterns: {}
# Custom icons for filenames and file extensions
# See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#custom-files-icon--color
customIcons:
# Map of filenames to icon properties (icon and color)
filenames: {}
# Map of file extensions (including the dot) to icon properties (icon and color)
extensions: {}
# The number of lines you scroll by when scrolling the main window
scrollHeight: 2
# If true, allow scrolling past the bottom of the content in the main window
scrollPastBottom: true
# See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#scroll-off-margin
scrollOffMargin: 2
# One of: 'margin' (default) | 'jump'
scrollOffBehavior: margin
# The number of spaces per tab; used for everything that's shown in the main view, but probably mostly relevant for diffs.
# Note that when using a pager, the pager has its own tab width setting, so you need to pass it separately in the pager command.
tabWidth: 2
# If true, capture mouse events.
# When mouse events are captured, it's a little harder to select text: e.g. requiring you to hold the option key when on macOS.
mouseEvents: true
# If true, do not show a warning when amending a commit.
skipAmendWarning: false
# If true, do not show a warning when discarding changes in the staging view.
skipDiscardChangeWarning: false
# If true, do not show warning when applying/popping the stash
skipStashWarning: false
# If true, do not show a warning when attempting to commit without any staged files; instead stage all unstaged files.
skipNoStagedFilesWarning: false
# If true, do not show a warning when rewording a commit via an external editor
skipRewordInEditorWarning: false
# Fraction of the total screen width to use for the left side section. You may want to pick a small number (e.g. 0.2) if you're using a narrow screen, so that you can see more of the main section.
# Number from 0 to 1.0.
sidePanelWidth: 0.3333
# If true, increase the height of the focused side window; creating an accordion effect.
expandFocusedSidePanel: false
# The weight of the expanded side panel, relative to the other panels. 2 means
# twice as tall as the other panels. Only relevant if `expandFocusedSidePanel` is true.
expandedSidePanelWeight: 2
# Sometimes the main window is split in two (e.g. when the selected file has both staged and unstaged changes). This setting controls how the two sections are split.
# Options are:
# - 'horizontal': split the window horizontally
# - 'vertical': split the window vertically
# - 'flexible': (default) split the window horizontally if the window is wide enough, otherwise split vertically
mainPanelSplitMode: flexible
# How the window is split when in half screen mode (i.e. after hitting '+' once).
# Possible values:
# - 'left': split the window horizontally (side panel on the left, main view on the right)
# - 'top': split the window vertically (side panel on top, main view below)
enlargedSideViewLocation: left
# If true, wrap lines in the staging view to the width of the view. This
# makes it much easier to work with diffs that have long lines, e.g.
# paragraphs of markdown text.
wrapLinesInStagingView: true
# If true, hunk selection mode will be enabled by default when entering the staging view.
useHunkModeInStagingView: false
# One of 'auto' (default) | 'en' | 'zh-CN' | 'zh-TW' | 'pl' | 'nl' | 'ja' | 'ko' | 'ru'
language: auto
# Format used when displaying time e.g. commit time.
# Uses Go's time format syntax: https://pkg.go.dev/time#Time.Format
timeFormat: 02 Jan 06
# Format used when displaying time if the time is less than 24 hours ago.
# Uses Go's time format syntax: https://pkg.go.dev/time#Time.Format
shortTimeFormat: 3:04PM
# Config relating to colors and styles.
# See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#color-attributes
theme:
# Border color of focused window
activeBorderColor:
- green
- bold
# Border color of non-focused windows
inactiveBorderColor:
- default
# Border color of focused window when searching in that window
searchingActiveBorderColor:
- cyan
- bold
# Color of keybindings help text in the bottom line
optionsTextColor:
- blue
# Background color of selected line.
# See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#highlighting-the-selected-line
selectedLineBgColor:
- blue
# Background color of selected line when view doesn't have focus.
inactiveViewSelectedLineBgColor:
- bold
# Foreground color of copied commit
cherryPickedCommitFgColor:
- blue
# Background color of copied commit
cherryPickedCommitBgColor:
- cyan
# Foreground color of marked base commit (for rebase)
markedBaseCommitFgColor:
- blue
# Background color of marked base commit (for rebase)
markedBaseCommitBgColor:
- yellow
# Color for file with unstaged changes
unstagedChangesColor:
- red
# Default text color
defaultFgColor:
- default
# Config relating to the commit length indicator
commitLength:
# If true, show an indicator of commit message length
show: true
# If true, show the '5 of 20' footer at the bottom of list views
showListFooter: true
# If true, display the files in the file views as a tree. If false, display the files as a flat list.
# This can be toggled from within Lazygit with the '`' key, but that will not change the default.
showFileTree: false
# If true, add a "/" root item in the file tree representing the root of the repository. It is only added when necessary, i.e. when there is more than one item at top level.
showRootItemInFileTree: true
# If true, show the number of lines changed per file in the Files view
showNumstatInFilesView: false
# If true, show a random tip in the command log when Lazygit starts
showRandomTip: true
# If true, show the command log
showCommandLog: true
# If true, show the bottom line that contains keybinding info and useful buttons. If false, this line will be hidden except to display a loader for an in-progress action.
showBottomLine: true
# If true, show jump-to-window keybindings in window titles.
showPanelJumps: true
# Nerd fonts version to use.
# One of: '2' | '3' | empty string (default)
# If empty, do not show icons.
nerdFontsVersion: ""
# If true (default), file icons are shown in the file views. Only relevant if NerdFontsVersion is not empty.
showFileIcons: true
# Length of author name in (non-expanded) commits view. 2 means show initials only.
commitAuthorShortLength: 2
# Length of author name in expanded commits view. 2 means show initials only.
commitAuthorLongLength: 17
# Length of commit hash in commits view. 0 shows '*' if NF icons aren't on.
commitHashLength: 8
# If true, show commit hashes alongside branch names in the branches view.
showBranchCommitHash: false
# Whether to show the divergence from the base branch in the branches view.
# One of: 'none' | 'onlyArrow' | 'arrowAndNumber'
showDivergenceFromBaseBranch: none
# Height of the command log view
commandLogSize: 8
# Whether to split the main window when viewing file changes.
# One of: 'auto' | 'always'
# If 'auto', only split the main window when a file has both staged and unstaged changes
splitDiff: auto
# Default size for focused window. Can be changed from within Lazygit with '+' and '_' (but this won't change the default).
# One of: 'normal' (default) | 'half' | 'full'
screenMode: normal
# Window border style.
# One of 'rounded' (default) | 'single' | 'double' | 'hidden' | 'bold'
border: rounded
# If true, show a seriously epic explosion animation when nuking the working tree.
animateExplosion: true
# Whether to stack UI components on top of each other.
# One of 'auto' (default) | 'always' | 'never'
portraitMode: auto
# How things are filtered when typing '/'.
# One of 'substring' (default) | 'fuzzy'
filterMode: substring
# Config relating to the spinner.
spinner:
# The frames of the spinner animation.
frames:
- '|'
- /
- '-'
- \
# The "speed" of the spinner in milliseconds.
rate: 50
# Status panel view.
# One of 'dashboard' (default) | 'allBranchesLog'
statusPanelView: dashboard
# If true, jump to the Files panel after popping a stash
switchToFilesAfterStashPop: true
# If true, jump to the Files panel after applying a stash
switchToFilesAfterStashApply: true
# If true, when using the panel jump keys (default 1 through 5) and target panel is already active, go to next tab instead
switchTabsWithPanelJumpKeys: false
# Config relating to git
git:
# See https://github.com/jesseduffield/lazygit/blob/master/docs/Custom_Pagers.md
paging:
# Value of the --color arg in the git diff command. Some pagers want this to be set to 'always' and some want it set to 'never'
colorArg: always
# e.g.
# diff-so-fancy
# delta --dark --paging=never
# ydiff -p cat -s --wrap --width={{columnWidth}}
pager: ""
# If true, Lazygit will use whatever pager is specified in `$GIT_PAGER`, `$PAGER`, or your *git config*. If the pager ends with something like ` | less` we will strip that part out, because less doesn't play nice with our rendering approach. If the custom pager uses less under the hood, that will also break rendering (hence the `--paging=never` flag for the `delta` pager).
useConfig: false
# e.g. 'difft --color=always'
externalDiffCommand: ""
# Config relating to committing
commit:
# If true, pass '--signoff' flag when committing
signOff: false
# Automatic WYSIWYG wrapping of the commit message as you type
autoWrapCommitMessage: true
# If autoWrapCommitMessage is true, the width to wrap to
autoWrapWidth: 72
# Config relating to merging
merging:
# If true, run merges in a subprocess so that if a commit message is required, Lazygit will not hang
# Only applicable to unix users.
manualCommit: false
# Extra args passed to `git merge`, e.g. --no-ff
args: ""
# The commit message to use for a squash merge commit. Can contain "{{selectedRef}}" and "{{currentBranch}}" placeholders.
squashMergeMessage: Squash merge {{selectedRef}} into {{currentBranch}}
# list of branches that are considered 'main' branches, used when displaying commits
mainBranches:
- master
- main
# Prefix to use when skipping hooks. E.g. if set to 'WIP', then pre-commit hooks will be skipped when the commit message starts with 'WIP'
skipHookPrefix: WIP
# If true, periodically fetch from remote
autoFetch: true
# If true, periodically refresh files and submodules
autoRefresh: true
# If not "none", lazygit will automatically fast-forward local branches to match their upstream after fetching. Applies to branches that are not the currently checked out branch, and only to those that are strictly behind their upstream (as opposed to diverged).
# Possible values: 'none' | 'onlyMainBranches' | 'allBranches'
autoForwardBranches: onlyMainBranches
# If true, pass the --all arg to git fetch
fetchAll: true
# If true, lazygit will automatically stage files that used to have merge
# conflicts but no longer do; and it will also ask you if you want to
# continue a merge or rebase if you've resolved all conflicts. If false, it
# won't do either of these things.
autoStageResolvedConflicts: true
# Command used when displaying the current branch git log in the main window
branchLogCmd: git log --graph --color=always --abbrev-commit --decorate --date=relative --pretty=medium {{branchName}} --
# Commands used to display git log of all branches in the main window, they will be cycled in order of appearance (array of strings)
allBranchesLogCmds:
- git log --graph --all --color=always --abbrev-commit --decorate --date=relative --pretty=medium
# If true, do not spawn a separate process when using GPG
overrideGpg: false
# If true, do not allow force pushes
disableForcePushing: false
# See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#predefined-commit-message-prefix
# commitPrefix: []
# See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#predefined-commit-message-prefix
commitPrefixes: {}
# See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#predefined-branch-name-prefix
branchPrefix: ""
# If true, parse emoji strings in commit messages e.g. render :rocket: as 🚀
# (This should really be under 'gui', not 'git')
parseEmoji: false
# Config for showing the log in the commits view
log:
# displays the whole git graph by default in the commits view (equivalent to passing the `--all` argument to `git log`)
showWholeGraph: false
# When copying commit hashes to the clipboard, truncate them to this
# length. Set to 40 to disable truncation.
truncateCopiedCommitHashesTo: 12
# Periodic update checks
update:
# One of: 'prompt' (default) | 'background' | 'never'
method: prompt
# Period in days between update checks
days: 14
# Background refreshes
refresher:
# File/submodule refresh interval in seconds.
# Auto-refresh can be disabled via option 'git.autoRefresh'.
refreshInterval: 10
# Re-fetch interval in seconds.
# Auto-fetch can be disabled via option 'git.autoFetch'.
fetchInterval: 60
# If true, show a confirmation popup before quitting Lazygit
confirmOnQuit: false
# If true, exit Lazygit when the user presses escape in a context where there is nothing to cancel/close
quitOnTopLevelReturn: false
# Config relating to things outside of Lazygit like how files are opened, copying to clipboard, etc
os:
# Command for editing a file. Should contain "{{filename}}".
edit: ""
# Command for editing a file at a given line number. Should contain
# "{{filename}}", and may optionally contain "{{line}}".
editAtLine: ""
# Same as EditAtLine, except that the command needs to wait until the
# window is closed.
editAtLineAndWait: ""
# Whether lazygit suspends until an edit process returns
editInTerminal: false
# For opening a directory in an editor
openDirInEditor: ""
# A built-in preset that sets all of the above settings. Supported presets
# are defined in the getPreset function in editor_presets.go.
editPreset: ""
# Command for opening a file, as if the file is double-clicked. Should
# contain "{{filename}}", but doesn't support "{{line}}".
open: ""
# Command for opening a link. Should contain "{{link}}".
openLink: ""
# CopyToClipboardCmd is the command for copying to clipboard.
# See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#custom-command-for-copying-to-and-pasting-from-clipboard
copyToClipboardCmd: ""
# ReadFromClipboardCmd is the command for reading the clipboard.
# See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#custom-command-for-copying-to-and-pasting-from-clipboard
readFromClipboardCmd: ""
# A shell startup file containing shell aliases or shell functions. This will be sourced before running any shell commands, so that shell functions are available in the `:` command prompt or even in custom commands.
# See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#using-aliases-or-functions-in-shell-commands
shellFunctionsFile: ""
# If true, don't display introductory popups upon opening Lazygit.
disableStartupPopups: false
# User-configured commands that can be invoked from within Lazygit
# See https://github.com/jesseduffield/lazygit/blob/master/docs/Custom_Command_Keybindings.md
customCommands: []
# See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#custom-pull-request-urls
services: {}
# What to do when opening Lazygit outside of a git repo.
# - 'prompt': (default) ask whether to initialize a new repo or open in the most recent repo
# - 'create': initialize a new repo
# - 'skip': open most recent repo
# - 'quit': exit Lazygit
notARepository: prompt
# If true, display a confirmation when subprocess terminates. This allows you to view the output of the subprocess before returning to Lazygit.
promptToReturnFromSubprocess: true
# Keybindings
keybinding:
universal:
quit: q
quit-alt1: <c-c>
return: <esc>
quitWithoutChangingDirectory: Q
togglePanel: <tab>
prevItem: <up>
nextItem: <down>
prevItem-alt: k
nextItem-alt: j
prevPage: ','
nextPage: .
scrollLeft: H
scrollRight: L
gotoTop: <
gotoBottom: '>'
gotoTop-alt: <home>
gotoBottom-alt: <end>
toggleRangeSelect: v
rangeSelectDown: <s-down>
rangeSelectUp: <s-up>
prevBlock: <left>
nextBlock: <right>
prevBlock-alt: h
nextBlock-alt: l
nextBlock-alt2: <tab>
prevBlock-alt2: <backtab>
jumpToBlock:
- "1"
- "2"
- "3"
- "4"
- "5"
focusMainView: "0"
nextMatch: "n"
prevMatch: "N"
startSearch: /
optionMenu: <disabled>
optionMenu-alt1: '?'
select: <space>
goInto: <enter>
confirm: <enter>
confirmInEditor: <a-enter>
confirmInEditor-alt: <c-s>
remove: d
new: "n"
edit: e
openFile: o
scrollUpMain: <pgup>
scrollDownMain: <pgdown>
scrollUpMain-alt1: K
scrollDownMain-alt1: J
scrollUpMain-alt2: <c-u>
scrollDownMain-alt2: <c-d>
executeShellCommand: ':'
createRebaseOptionsMenu: m
# 'Files' appended for legacy reasons
pushFiles: P
# 'Files' appended for legacy reasons
pullFiles: p
refresh: R
createPatchOptionsMenu: <c-p>
nextTab: ']'
prevTab: '['
nextScreenMode: +
prevScreenMode: _
undo: z
redo: <c-z>
filteringMenu: <c-s>
diffingMenu: W
diffingMenu-alt: <c-e>
copyToClipboard: <c-o>
openRecentRepos: <c-r>
submitEditorText: <enter>
extrasMenu: '@'
toggleWhitespaceInDiffView: <c-w>
increaseContextInDiffView: '}'
decreaseContextInDiffView: '{'
increaseRenameSimilarityThreshold: )
decreaseRenameSimilarityThreshold: (
openDiffTool: <c-t>
status:
checkForUpdate: u
recentRepos: <enter>
allBranchesLogGraph: a
files:
commitChanges: c
commitChangesWithoutHook: w
amendLastCommit: A
commitChangesWithEditor: C
findBaseCommitForFixup: <c-f>
confirmDiscard: x
ignoreFile: i
refreshFiles: r
stashAllChanges: s
viewStashOptions: S
toggleStagedAll: a
viewResetOptions: D
fetch: f
toggleTreeView: '`'
openMergeTool: M
openStatusFilter: <c-b>
copyFileInfoToClipboard: "y"
collapseAll: '-'
expandAll: =
branches:
createPullRequest: o
viewPullRequestOptions: O
copyPullRequestURL: <c-y>
checkoutBranchByName: c
forceCheckoutBranch: F
rebaseBranch: r
renameBranch: R
mergeIntoCurrentBranch: M
moveCommitsToNewBranch: "N"
viewGitFlowOptions: i
fastForward: f
createTag: T
pushTag: P
setUpstream: u
fetchRemote: f
sortOrder: s
worktrees:
viewWorktreeOptions: w
commits:
squashDown: s
renameCommit: r
renameCommitWithEditor: R
viewResetOptions: g
markCommitAsFixup: f
createFixupCommit: F
squashAboveCommits: S
moveDownCommit: <c-j>
moveUpCommit: <c-k>
amendToCommit: A
resetCommitAuthor: a
pickCommit: p
revertCommit: t
cherryPickCopy: C
pasteCommits: V
markCommitAsBaseForRebase: B
tagCommit: T
checkoutCommit: <space>
resetCherryPick: <c-R>
copyCommitAttributeToClipboard: "y"
openLogMenu: <c-l>
openInBrowser: o
viewBisectOptions: b
startInteractiveRebase: i
selectCommitsOfCurrentBranch: '*'
amendAttribute:
resetAuthor: a
setAuthor: A
addCoAuthor: c
stash:
popStash: g
renameStash: r
commitFiles:
checkoutCommitFile: c
main:
toggleSelectHunk: a
pickBothHunks: b
editSelectHunk: E
submodules:
init: i
update: u
bulkMenu: b
commitMessage:
commitMenu: <c-o>

5
.config/nvim/init.lua Normal file
View file

@ -0,0 +1,5 @@
require("options")
require("config.lazy")
require("keymaps")
require("autocmd")
require("snippets")

View file

@ -0,0 +1,35 @@
{
"FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" },
"LuaSnip": { "branch": "master", "commit": "5a1e39223db9a0498024a77b8441169d260c8c25" },
"aerial.nvim": { "branch": "master", "commit": "7a6a42791eb2b54a7115c7db4488981f93471770" },
"auto-session": { "branch": "main", "commit": "dcbc339a1a0e6505f755d980ad11f892b6a8d492" },
"blink.cmp": { "branch": "main", "commit": "4b18c32adef2898f95cdef6192cbd5796c1a332d" },
"conform.nvim": { "branch": "master", "commit": "c2526f1cde528a66e086ab1668e996d162c75f4f" },
"flash.nvim": { "branch": "main", "commit": "fcea7ff883235d9024dc41e638f164a450c14ca2" },
"friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" },
"hardtime.nvim": { "branch": "main", "commit": "b4e431934af1fe224a3a801f632c008278cb7628" },
"js-i18n.nvim": { "branch": "main", "commit": "5157a1c1a47b14aa77fa6e50626dc1add4d1a618" },
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
"lazydev.nvim": { "branch": "main", "commit": "5231c62aa83c2f8dc8e7ba957aa77098cda1257d" },
"lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "21c2a84ce368e99b18f52ab348c4c02c32c02fcf" },
"mason.nvim": { "branch": "main", "commit": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65" },
"mentor.nvim": { "branch": "main", "commit": "54733a923072d57e50f3acc0d850fbd0b3b95f8a" },
"minuet-ai.nvim": { "branch": "main", "commit": "3d25c24487876676d29d325c01ce108cbdbd0753" },
"neotest": { "branch": "master", "commit": "deadfb1af5ce458742671ad3a013acb9a6b41178" },
"neotest-jest": { "branch": "main", "commit": "3f0cc2cff1ee05394081805c622dc2551b54d8c4" },
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
"nvim-autopairs": { "branch": "master", "commit": "59bce2eef357189c3305e25bc6dd2d138c1683f5" },
"nvim-lspconfig": { "branch": "master", "commit": "44acfe887d4056f704ccc4f17513ed41c9e2b2e6" },
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
"nvim-surround": { "branch": "main", "commit": "1098d7b3c34adcfa7feb3289ee434529abd4afd1" },
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
"nvim-web-devicons": { "branch": "master", "commit": "746ffbb17975ebd6c40142362eee1b0249969c5c" },
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
"render-markdown.nvim": { "branch": "main", "commit": "48b4175dbca8439d30c1f52231cbe5a712c8f9d9" },
"smear-cursor.nvim": { "branch": "main", "commit": "c85bdbb25db096fbcf616bc4e1357bd61fe2c199" },
"snacks.nvim": { "branch": "main", "commit": "da230e3ca8146da4b73752daaf0a1d07d343c12d" },
"tokyonight.nvim": { "branch": "main", "commit": "5da1b76e64daf4c5d410f06bcb6b9cb640da7dfd" },
"typescript-tools.nvim": { "branch": "master", "commit": "c2f5910074103705661e9651aa841e0d7eea9932" },
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" }
}

View file

@ -0,0 +1,55 @@
-- [[ Basic Autocommands ]]
-- See `:help lua-guide-autocommands`
-- Highlight when yanking (copying) text
-- Try it with `yap` in normal mode
-- See `:help vim.highlight.on_yank()`
vim.api.nvim_create_autocmd("TextYankPost", {
desc = "Highlight when yanking (copying) text",
group = vim.api.nvim_create_augroup("highlight-yank", { clear = true }),
callback = function()
vim.hl.on_yank()
end,
})
-- vim.api.nvim_create_autocmd({ "CursorHold", "CursorHoldI" }, {
-- desc = "diagnostics on hold",
-- group = vim.api.nvim_create_augroup("diagnostics", { clear = true }),
-- callback = function()
-- vim.diagnostic.open_float(nil, { focus = false })
-- end,
-- })
-- TODO: check if it interferes with C-s shortcut
vim.api.nvim_create_autocmd({ "BufWritePre" }, {
desc = "create parent folders automatically",
group = vim.api.nvim_create_augroup("create-parent-automatically", { clear = true }),
callback = function()
vim.cmd(":silent !mkdir -p %:p:h")
end,
})
vim.api.nvim_create_autocmd("BufReadPost", {
pattern = { "*" },
desc = "When editing a file, always jump to the last known cursor position",
group = vim.api.nvim_create_augroup("last-location", { clear = true }),
callback = function()
local line = vim.fn.line("'\"")
if
line >= 1
and line <= vim.fn.line("$")
and vim.bo.filetype ~= "commit"
and vim.fn.index({ "xxd", "gitrebase" }, vim.bo.filetype) == -1
then
vim.cmd('normal! g`"')
end
end,
})
vim.api.nvim_create_autocmd("VimEnter", {
desc = "Clear jump list when vim starts",
group = vim.api.nvim_create_augroup("clear-jumps", { clear = true }),
callback = function()
vim.cmd.clearjumps()
end,
})

View file

@ -0,0 +1,23 @@
-- [[ Install `lazy.nvim` plugin manager ]]
-- See `:help lazy.nvim.txt` or https://github.com/folke/lazy.nvim for more info
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
local out = vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"--branch=stable",
lazyrepo,
lazypath,
})
if vim.v.shell_error ~= 0 then
error("Error cloning lazy.nvim:\n" .. out)
end
end
vim.opt.rtp:prepend(lazypath)
require("lazy").setup({ import = "plugins" }, { install = { colorscheme = { "tokyonight-storm" } } })

View file

@ -0,0 +1,83 @@
vim.keymap.set({ "n", "v" }, "<C-s>", ":w ++p<CR>", { desc = "save file" })
vim.keymap.set({ "i" }, "<C-s>", "<ESC>:w ++p<CR>a", { desc = "save file" })
vim.keymap.set("n", "<leader>;", ":", { desc = "command with ;" })
vim.keymap.set("v", "<leader>;", ":", { desc = "command with ;" })
vim.keymap.set("n", "q", ":bd<cr>", { desc = "close buffer" })
vim.keymap.set("n", "Q", ":%bd<cr>", { desc = "close all buffers" })
vim.keymap.set({ "n", "v" }, "d", '"_d', { desc = "delete without cut" })
vim.keymap.set({ "n", "v" }, "c", '"_c', { desc = "delete without cut" })
vim.keymap.set({ "v", "n" }, "vv", "<C-v>", { desc = "vv for visual block" })
vim.keymap.set("i", "jj", "<ESC>", { silent = true, desc = "back to normal with jj" })
vim.keymap.set("v", "p", '"_dP', { desc = "do not overwrite 0 register when pasting over selection" })
-- Exit terminal mode in the builtin terminal with a shortcut that is a bit easier
-- for people to discover. Otherwise, you normally need to pres <C-\><C-n>, which
-- is not what someone will guess without a bit more experience.
--
-- NOTE: This won't work in all terminal emulators/tmux/etc. Try your own mapping
-- or just use <C-\><C-n> to exit terminal mode
vim.keymap.set("t", "<Esc><Esc>", "<C-\\><C-n>", { desc = "Exit terminal mode" })
-- TIP: Disable arrow keys in normal mode
vim.keymap.set("n", "<left>", '<cmd>echo "Use h to move!!"<CR>')
vim.keymap.set("n", "<right>", '<cmd>echo "Use l to move!!"<CR>')
vim.keymap.set("n", "<up>", '<cmd>echo "Use k to move!!"<CR>')
vim.keymap.set("n", "<down>", '<cmd>echo "Use j to move!!"<CR>')
vim.keymap.set("n", "<X1Mouse>", "<C-O>", { silent = true, desc = "go back with mouse" })
vim.keymap.set("n", "<X2Mouse>", "<C-I>", { silent = true, desc = "go forward with mouse" })
-- Keybindings to make split navigation easier.
-- Use CTRL+<hjkl> to switch between windows
--
-- See `:help wincmd` for a list of all window commands
vim.keymap.set("n", "<C-h>", "<C-w><C-h>", { desc = "Move focus to the left window" })
vim.keymap.set("n", "<C-l>", "<C-w><C-l>", { desc = "Move focus to the right window" })
vim.keymap.set("n", "<C-j>", "<C-w><C-j>", { desc = "Move focus to the lower window" })
vim.keymap.set("n", "<C-k>", "<C-w><C-k>", { desc = "Move focus to the upper window" })
vim.keymap.set("n", "<S-h>", ":bprevious<CR>", { desc = "Previous buffer" })
vim.keymap.set("n", "<S-l>", ":bnext<CR>", { desc = "Next buffer" })
vim.keymap.set("v", "<C-r>", function()
-- get contents of visual selection
-- handle unpack deprecation
table.unpack = table.unpack or unpack
local function get_visual()
local _, ls, cs = table.unpack(vim.fn.getpos("v"))
local _, le, ce = table.unpack(vim.fn.getpos("."))
return vim.api.nvim_buf_get_text(0, ls - 1, cs - 1, le - 1, ce, {})
end
local pattern = table.concat(get_visual())
-- escape regex and line endings
pattern = vim.fn.substitute(vim.fn.escape(pattern, "^$.*\\/~[]"), "\n", "\\n", "g")
-- send parsed substitution command to command line
vim.api.nvim_input("<Esc>:%s/" .. pattern .. "//<Left>")
end)
-- diagnostics
-- Show virtual lines diagnostics and hide when moved
local default_diagnostics = function()
vim.api.nvim_create_autocmd("CursorMoved", {
group = vim.api.nvim_create_augroup("line-diagnostics", { clear = true }),
callback = function()
vim.diagnostic.config({ virtual_lines = false, virtual_text = true })
return true
end,
})
end
vim.keymap.set("n", "<leader>dd", function()
vim.diagnostic.config({ virtual_lines = { current_line = true }, virtual_text = false })
default_diagnostics()
end, { desc = "show diagnostics in virtual lines" })
vim.keymap.set("n", "<leader>df", function()
vim.diagnostic.config({ virtual_text = false })
vim.diagnostic.open_float({ scope = "line" })
default_diagnostics()
end, { desc = "show diagnostics in floating window" })
vim.keymap.set("n", "<leader>j", ":try | cprev | catch | clast | catch | endtry<cr>zz", { desc = "quickfix prev" })
vim.keymap.set("n", "<leader>k", ":try | cnext | catch | cfirst | catch | endtry<cr>zz", { desc = "quickfix next" })
vim.keymap.set("n", "<leader>qf", ":Cfilter! ", { desc = "quickfix filter" })

View file

@ -0,0 +1,91 @@
-- space as a leader key
vim.g.mapleader = " "
-- flush buffer on focus change
vim.g.autowrite = "on"
-- Set to true if you have a Nerd Font installed and selected in the terminal
vim.g.have_nerd_font = true
vim.opt.completeopt = { "popup", "menu", "menuone", "noselect" }
vim.opt.mouse = "a" -- allow the mouse to be used in Nvim
-- Tab
vim.opt.tabstop = 2 -- number of visual spaces per TAB
vim.opt.softtabstop = 2 -- number of spaces in tab when editing
vim.opt.shiftwidth = 2 -- insert 4 spaces on a tab
vim.opt.expandtab = true -- tabs are spaces, mainly because of python
-- UI config
vim.opt.number = false -- show absolute number
vim.opt.relativenumber = false -- add numbers to each line on the left side
vim.opt.cursorline = true -- highlight cursor line underneath the cursor horizontally
vim.opt.splitbelow = true -- open new vertical split bottom
vim.opt.splitright = true -- open new horizontal splits right
vim.opt.termguicolors = true -- enabl 24-bit RGB color in the TUI
vim.opt.showmode = false -- we are experienced, wo don't need the "-- INSERT --" mode hint
vim.opt.wrap = false
-- Sets how neovim will display certain whitespace characters in the editor.
-- See `:help 'list'`
-- and `:help 'listchars'`
vim.opt.list = true
vim.opt.listchars = { tab = "» ", trail = "·", nbsp = "" }
-- Enable break indent
-- Every wrapped line will continue visually indented (same amount of
-- space as the beginning of that line), thus preserving horizontal blocks
-- of text.
vim.opt.breakindent = true
-- Preview substitutions live, as you type!
vim.opt.inccommand = "split"
-- Searching
vim.opt.incsearch = true -- search as characters are entered
vim.opt.hlsearch = false -- do not highlight matches
vim.opt.ignorecase = true -- ignore case in searches by default
vim.opt.smartcase = true -- but make it case sensitive if an uppercase is entered
-- Sync clipboard between OS and Neovim.
-- Schedule the setting after `UiEnter` because it can increase startup-time.
-- Remove this option if you want your OS clipboard to remain independent.
-- See `:help 'clipboard'`
vim.schedule(function()
vim.opt.clipboard = "unnamedplus"
end)
-- Save undo history
vim.opt.undofile = true
-- Off signcolumn on by default
vim.opt.signcolumn = "no"
-- Decrease update time
vim.opt.updatetime = 250
-- Decrease mapped sequence wait time
-- Displays which-key popup sooner
vim.opt.timeoutlen = 300
-- Minimal number of screen lines to keep above and below the cursor.
vim.opt.scrolloff = 10
-- folds
vim.opt.foldcolumn = "0"
vim.opt.foldmethod = "expr"
vim.opt.foldexpr = "v:lua.vim.treesitter.foldexpr()"
vim.opt.foldtext = ""
-- vim.opt.foldnestmax = 3
vim.opt.foldlevel = 99
vim.opt.foldlevelstart = 99
vim.opt.splitright = true
vim.opt.splitbelow = true
vim.opt.cmdheight = 0
-- do not unload closed buffer from jumplist
vim.opt.jumpoptions = ""
vim.diagnostic.config({ virtual_text = true, underline = false })
vim.cmd.packadd("cfilter")

View file

@ -0,0 +1,55 @@
return {
"stevearc/aerial.nvim",
opts = {
highlight_on_hover = true,
highlight_on_jump = 300,
autojump = true,
post_jump_cmd = "normal! zzl",
filter_kind = {
"Array",
"Boolean",
"Class",
"Constant",
"Constructor",
"Enum",
"EnumMember",
"Event",
"Field",
"File",
"Function",
"Interface",
"Key",
"Method",
"Module",
"Namespace",
"Null",
"Number",
"Object",
"Operator",
"Package",
"Property",
"String",
"Struct",
"TypeParameter",
"Variable",
},
},
-- Optional dependencies
dependencies = {
"nvim-treesitter/nvim-treesitter",
"nvim-tree/nvim-web-devicons",
},
keys = {
{
"<leader>ss",
function()
require("aerial").snacks_picker({
layout = {
cycle = true,
},
})
end,
desc = "Symbols",
},
},
}

View file

@ -0,0 +1,6 @@
return {
"windwp/nvim-autopairs",
event = "InsertEnter",
config = true,
}

View file

@ -0,0 +1,75 @@
return {
"saghen/blink.cmp",
dependencies = {
{ "L3MON4D3/LuaSnip", version = "v2.*" },
},
version = "1.*",
config = function()
require("blink.cmp").setup({
fuzzy = {
frecency = {
enabled = true,
unsafe_no_lock = false,
},
use_proximity = true,
sorts = {
-- "exact",
"score",
"sort_text",
"label",
},
},
keymap = {
preset = "enter",
["<C-space>"] = { "hide", "show", "fallback" },
["<A-y>"] = require("minuet").make_blink_map(),
},
completion = {
trigger = {
prefetch_on_insert = false,
-- show_in_snippet = false,
},
-- Disable showing for all alphanumeric keywords by default. Prefer LSP specific trigger
-- characters.
-- trigger = { show_on_keyword = false },
-- Controls whether the documentation window will automatically show when selecting a completion item
documentation = {
auto_show = true,
auto_show_delay_ms = 500,
window = {
border = "rounded",
scrollbar = false,
},
},
menu = {
border = "rounded",
draw = { gap = 2 },
scrollbar = false,
},
},
snippets = { preset = "luasnip" },
sources = {
-- add lazydev to your completion providers
default = { "lazydev", "lsp", "snippets", "path", "buffer" },
providers = {
lazydev = {
name = "LazyDev",
module = "lazydev.integrations.blink",
-- make lazydev completions top priority (see `:h blink.cmp`)
score_offset = 100,
},
minuet = {
name = "minuet",
module = "minuet.blink",
async = true,
-- Should match minuet.config.request_timeout * 1000,
-- since minuet.config.request_timeout is in seconds
timeout_ms = 3000,
score_offset = 50, -- Gives minuet higher priority among suggestions
},
},
},
signature = { enabled = true },
})
end,
}

View file

@ -0,0 +1,43 @@
-- Autoformat
return {
"stevearc/conform.nvim",
event = { "BufWritePre" },
cmd = { "ConformInfo" },
keys = {
{
"<leader>f",
function()
require("conform").format({ async = true, lsp_format = "fallback" })
end,
mode = "",
desc = "[F]ormat buffer",
},
},
opts = {
notify_on_error = false,
format_on_save = function(bufnr)
-- Disable "format_on_save lsp_fallback" for languages that don't
-- have a well standardized coding style. You can add additional
-- languages here or re-enable it for the disabled ones.
local disable_filetypes = { c = true, cpp = true }
local lsp_format_opt
if disable_filetypes[vim.bo[bufnr].filetype] then
lsp_format_opt = "never"
end
return {
timeout_ms = 500,
lsp_format = lsp_format_opt,
}
end,
formatters_by_ft = {
lua = { "stylua" },
javascript = { "biome", "biome-organize-imports" },
javascriptreact = { "biome", "biome-organize-imports" },
typescript = { "biome", "biome-organize-imports" },
typescriptreact = { "biome", "biome-organize-imports" },
-- You can use 'stop_after_first' to run the first available formatter from the list
-- javascript = { "prettierd", "prettier", stop_after_first = true },
},
},
}

View file

@ -0,0 +1,44 @@
return {
"folke/flash.nvim",
event = "VeryLazy",
opts = {
jump = {
autojump = true,
},
label = {
-- before = true,
after = true,
min_pattern_length = 1,
style = "overlay",
},
search = {
mode = "search",
},
},
keys = {
{
"s",
mode = { "n", "x", "o" },
function()
require("flash").jump()
end,
desc = "Flash",
},
-- {
-- "S",
-- mode = { "n", "x", "o" },
-- function()
-- require("flash").treesitter()
-- end,
-- desc = "Flash Treesitter",
-- },
{
"R",
mode = { "o", "x" },
function()
require("flash").treesitter_search()
end,
desc = "Treesitter Search",
},
},
}

View file

@ -0,0 +1,14 @@
return {
"m4xshen/hardtime.nvim",
lazy = false,
dependencies = { "MunifTanjim/nui.nvim" },
opts = {
disable_mouse = false,
disabled_keys = {
["<Up>"] = false,
["<Down>"] = false,
["<Left>"] = false,
["<Right>"] = false,
},
},
}

View file

@ -0,0 +1,14 @@
return {
"nabekou29/js-i18n.nvim",
dependencies = {
"neovim/nvim-lspconfig",
"nvim-treesitter/nvim-treesitter",
"nvim-lua/plenary.nvim",
},
event = { "BufReadPre", "BufNewFile" },
opts = {
virt_text = {
enabled = false, -- Enable virtual text display
},
},
}

View file

@ -0,0 +1,15 @@
-- lazydev.nvim is a plugin that properly configures LuaLS for editing your Neovim config by
-- lazily updating your workspace libraries.
return {
'folke/lazydev.nvim',
ft = 'lua',
opts = {
library = {
-- See the configuration section for more details
-- Load luvit types when the `vim.uv` word is found
{ path = "${3rd}/luv/library", words = { "vim%.uv" } },
'~/.local/share/nvim/lazy/',
{ path = "snacks.nvim", words = { "Snacks", "snacks" } },
},
}
}

View file

@ -0,0 +1,45 @@
return {
"nvim-lualine/lualine.nvim",
dependencies = { "nvim-tree/nvim-web-devicons" },
opts = {
options = {
icons_enabled = true,
theme = "auto",
component_separators = { left = "", right = "" },
section_separators = { left = "", right = "" },
disabled_filetypes = {
statusline = {},
winbar = {},
},
ignore_focus = {},
always_divide_middle = true,
always_show_tabline = true,
globalstatus = false,
refresh = {
statusline = 100,
tabline = 100,
winbar = 100,
},
},
sections = {
lualine_a = { "mode" },
lualine_b = { "branch", "diff", "diagnostics" },
lualine_c = { "filename" },
lualine_x = { "encoding", "fileformat", "filetype" },
lualine_y = { "progress" },
lualine_z = { "location" },
},
inactive_sections = {
lualine_a = {},
lualine_b = {},
lualine_c = { "filename" },
lualine_x = { "location" },
lualine_y = {},
lualine_z = {},
},
tabline = {},
winbar = {},
inactive_winbar = {},
extensions = {},
},
}

View file

@ -0,0 +1,57 @@
return {
"L3MON4D3/LuaSnip",
-- follow latest release.
version = "v2.*", -- Replace <CurrentMajor> by the latest released major (first number of latest release)
-- install jsregexp (optional!).
build = "make install_jsregexp",
dependencies = {
"rafamadriz/friendly-snippets",
},
config = function()
require("luasnip").setup({
update_events = "TextChanged,TextChangedI",
})
require("luasnip.loaders.from_vscode").lazy_load()
require("luasnip").filetype_extend("typescript", { "javascript" })
require("luasnip").filetype_extend("typescriptreact", { "javascript" })
end,
-- keys = {
-- {
-- "<leader>rs",
-- ":source ~/.config/nvim/lua/snippets.lua<CR>",
-- desc = "[R]eload [s]nippets",
-- },
-- {
-- "<Tab>",
-- function()
-- if require("luasnip").locally_jumpable(1) then
-- require("luasnip").jump(1)
-- end
-- end,
-- mode = { "i", "s" },
-- desc = "next snippet placeholder",
-- },
-- {
-- "<S-Tab>",
-- function()
-- if require("luasnip").locally_jumpable(-1) then
-- require("luasnip").jump(-1)
-- end
-- end,
-- mode = { "i", "s" },
-- desc = "prev snippet placeholder",
-- },
-- {
-- "<C-e>",
-- function()
-- if require("luasnip").choice_active() then
-- require("luasnip").change_choice(1)
-- end
-- end,
-- mode = { "i", "s" },
-- desc = "prev snippet placeholder",
-- },
-- },
}

View file

@ -0,0 +1,4 @@
return {
"MeanderingProgrammer/render-markdown.nvim",
ft = { "markdown", "codecompanion" },
}

View file

@ -0,0 +1,112 @@
-- Automatically install LSPs and related tools to stdpath for neovim
return {
"williamboman/mason.nvim",
dependencies = {
"neovim/nvim-lspconfig",
"williamboman/mason-lspconfig.nvim",
},
config = function()
local servers = {
harper_ls = {
settings = {
["harper-ls"] = {
userDictPath = vim.fn.stdpath("config") .. "/spell/en.utf-8.add",
},
},
},
marksman = {},
-- vtsls = {
-- settings = {
-- complete_function_calls = true,
-- vtsls = {
-- enableMoveToFileCodeAction = true,
-- autoUseWorkspaceTsdk = true,
-- experimental = {
-- completion = {
-- enableServerSideFuzzyMatch = true,
-- },
-- },
-- },
-- javascript = {
-- updateImportsOnFileMove = { enabled = "always" },
-- suggest = {
-- completeFunctionCalls = true,
-- },
-- inlayHints = {
-- enumMemberValues = { enabled = true },
-- functionLikeReturnTypes = { enabled = true },
-- parameterNames = { enabled = "literals" },
-- parameterTypes = { enabled = true },
-- propertyDeclarationTypes = { enabled = true },
-- variableTypes = { enabled = true },
-- },
-- },
-- typescript = {
-- updateImportsOnFileMove = { enabled = "always" },
-- suggest = {
-- completeFunctionCalls = true,
-- },
-- inlayHints = {
-- enumMemberValues = { enabled = true },
-- functionLikeReturnTypes = { enabled = true },
-- parameterNames = { enabled = "literals" },
-- parameterTypes = { enabled = true },
-- propertyDeclarationTypes = { enabled = true },
-- variableTypes = { enabled = true },
-- },
-- },
-- },
-- },
lua_ls = {
settings = {
Lua = {
telemetry = { enable = false },
-- NOTE: toggle below to ignore Lua_LS's noisy `missing-fields` warnings
diagnostics = { disable = { "missing-fields" } },
hint = { enable = true },
},
},
},
tailwindcss = {},
html = {},
cssls = {},
emmet_language_server = {},
}
-- Special formatted fields cannot be set above
-- servers.vtsls.settings["js/ts"] = { implicitProjectConfig = { checkJs = true } }
require("mason").setup()
require("mason-lspconfig").setup({
ensure_installed = vim.tbl_keys(servers or {}),
automatic_installation = false,
handlers = {
function(server_name)
local server = servers[server_name] or {}
-- This handles overriding only values explicitly passed
-- by the server configuration above. Useful when disabling
-- certain features of an LSP (for example, turning off formatting for ts_ls)
server.capabilities = vim.tbl_deep_extend("force", {}, server.capabilities or {})
require("lspconfig")[server_name].setup(server)
end,
},
})
-- TODO: move to native lsp configs when
-- lspconfig plugin will be merged into core
-- for server, settings in pairs(servers) do
-- vim.lsp.config(server, settings)
-- vim.lsp.enable(server)
-- end
-- Linters
local linters = { "stylua", "biome" }
for _, linter in ipairs(linters) do
if not require("mason-registry").is_installed(linter) then
vim.cmd("MasonInstall " .. linter)
end
end
end,
}

View file

@ -0,0 +1,9 @@
return {
"cksidharthan/mentor.nvim",
opts = {
tips = {
"You can use shift+a to jump to end of line in insert mode.",
"Shift+p to paste in visual mode multiple times",
},
},
}

View file

@ -0,0 +1,58 @@
return {
{
"milanglacier/minuet-ai.nvim",
config = function()
require("minuet").setup({
provider = "gemini",
provider_options = {
claude = {
max_tokens = 512,
model = "claude-haiku-4-5",
},
codestral = {
optional = {
max_tokens = 256,
stop = { "\n\n" },
},
},
gemini = {
model = "gemini-2.0-flash",
optional = {
generationConfig = {
maxOutputTokens = 256,
-- When using `gemini-2.5-flash`, it is recommended to entirely
-- disable thinking for faster completion retrieval.
thinkingConfig = {
thinkingBudget = 0,
},
},
safetySettings = {
{
-- HARM_CATEGORY_HATE_SPEECH,
-- HARM_CATEGORY_HARASSMENT
-- HARM_CATEGORY_SEXUALLY_EXPLICIT
category = "HARM_CATEGORY_DANGEROUS_CONTENT",
-- BLOCK_NONE
threshold = "BLOCK_ONLY_HIGH",
},
},
},
},
},
virtualtext = {
auto_trigger_ft = { "lua", "typescript", "typescriptreact", "javascript" },
keymap = {
accept = "<A-CR>",
accept_line = "<A-S>CR",
accept_n_lines = "<A-z>",
prev = "<A-j>",
next = "<A-k>",
dismiss = "<A-e>",
},
show_on_completion_menu = true,
},
})
end,
},
{ "nvim-lua/plenary.nvim" },
}

View file

@ -0,0 +1,58 @@
return {
"nvim-neotest/neotest",
dependencies = {
"nvim-neotest/nvim-nio",
"nvim-lua/plenary.nvim",
"antoinemadec/FixCursorHold.nvim",
"nvim-treesitter/nvim-treesitter",
"nvim-neotest/neotest-jest",
},
keys = {
{
"<leader>tt",
function()
require("neotest").run.run()
end,
mode = "",
desc = "[T]est run under cursor",
},
{
"<leader>ts",
function()
require("neotest").summary.toggle()
end,
mode = "",
desc = "[T]est [s]tatus",
},
{
"<leader>tf",
function()
require("neotest").run.run(vim.fn.expand("%"))
end,
mode = "",
desc = "[T]est [f]ile",
},
{
"<leader>tw",
function()
require("neotest").watch.watch()
end,
mode = "",
desc = "[T]est [w]atch under cursor",
},
},
config = function()
require("neotest").setup({
discovery = {
enabled = false,
},
adapters = {
require("neotest-jest")({
cwd = function(path)
return vim.fn.getcwd()
end,
}),
},
})
end,
}

View file

@ -0,0 +1,12 @@
return {
"rmagatti/auto-session",
lazy = false,
---enables autocomplete for opts
---@module "auto-session"
---@type AutoSession.Config
opts = {
suppressed_dirs = { "~/", "~/Projects", "~/Downloads", "/" },
-- log_level = 'debug',
},
}

View file

@ -0,0 +1,4 @@
return {
"sphamba/smear-cursor.nvim",
opts = {},
}

View file

@ -0,0 +1,374 @@
return {
"folke/snacks.nvim",
tag = "v2.23.0",
priority = 1000,
lazy = false,
---@type snacks.Config
opts = {
bigfile = { enabled = true },
explorer = { enabled = true, replace_netrw = true },
indent = { enabled = true },
input = { enabled = true },
notifier = {
enabled = true,
timeout = 10000,
width = { min = 40, max = 100 },
height = { min = 1, max = 1000 },
},
image = { enabled = false },
picker = {
layout = { fullscreen = true },
matcher = {
fuzzy = true, -- use fuzzy matching
smartcase = true, -- use smartcase
ignorecase = true, -- use ignorecase
sort_empty = false, -- sort results when the search string is empty
filename_bonus = true, -- give bonus for matching file names (last part of the path)
file_pos = true, -- support patterns like `file:line:col` and `file:line`
-- the bonusses below, possibly require string concatenation and path normalization,
-- so this can have a performance impact for large lists and increase memory usage
cwd_bonus = false, -- give bonus for matching files in the cwd
frecency = true, -- frecency bonus
history_bonus = false, -- give more weight to chronological order
},
},
quickfile = { enabled = true },
scroll = { enabled = false },
statuscolumn = { enabled = true },
words = { enabled = true },
styles = {
notification = {},
},
},
keys = {
-- Top Pickers & Explorer
{
"<leader><space>",
function()
Snacks.picker.buffers({ matcher = { frecency = true } })
end,
desc = "Buffers",
},
{
"<leader>e",
function()
Snacks.explorer({ layout = { fullscreen = false } })
end,
desc = "File Explorer",
},
-- config
{
"<leader>cc",
function()
Snacks.picker.files({ cwd = vim.fn.stdpath("config") })
end,
desc = "Find Config File",
},
-- search
{
"<leader>sf",
function()
Snacks.picker.files({
matcher = { frecency = true },
layout = { preset = "select" },
})
end,
desc = "Find Files",
},
{
"<leader>/",
function()
Snacks.picker.lines()
end,
desc = "Buffer Lines",
},
{
"<leader>sg",
function()
Snacks.picker.grep()
end,
desc = "Grep",
},
{
"<leader>sB",
function()
Snacks.picker.grep_buffers()
end,
desc = "Grep Open Buffers",
},
{
"<leader>sp",
function()
Snacks.picker.projects()
end,
desc = "Projects",
},
{
"<leader>sc",
function()
Snacks.picker.commands()
end,
desc = "Commands",
},
{
"<leader>sd",
function()
Snacks.picker.diagnostics_buffer({
matcher = { smartcase = true },
})
end,
desc = "Buffer Diagnostics",
},
{
"<leader>sD",
function()
Snacks.picker.diagnostics()
end,
desc = "All Diagnostics",
},
{
"<leader>sh",
function()
Snacks.picker.help()
end,
desc = "Help Pages",
},
{
"<leader>sH",
function()
Snacks.picker.highlights()
end,
desc = "Highlights",
},
{
"<leader>sj",
function()
Snacks.picker.jumps()
end,
desc = "Jumps",
},
{
"<leader>sk",
function()
Snacks.picker.keymaps()
end,
desc = "Keymaps",
},
{
"<leader>sM",
function()
Snacks.picker.man()
end,
desc = "Man Pages",
},
{
"<leader>sq",
function()
Snacks.picker.qflist()
end,
desc = "Quickfix List",
},
{
"<leader>sR",
function()
Snacks.picker.resume()
end,
desc = "Resume",
},
{
"<leader>su",
function()
Snacks.picker.undo()
end,
desc = "Undo History",
},
{
"<leader>co",
function()
Snacks.picker.colorschemes()
end,
desc = "Colorschemes",
},
-- LSP
{
"<leader>gd",
function()
Snacks.picker.lsp_definitions()
end,
desc = "Goto Definition",
},
{
"<leader>gD",
function()
Snacks.picker.lsp_declarations()
end,
desc = "Goto Declaration",
},
{
"<leader>gr",
function()
Snacks.picker.lsp_references()
end,
nowait = true,
desc = "References",
},
{
"<leader>gi",
function()
Snacks.picker.lsp_implementations()
end,
desc = "Goto Implementation",
},
{
"<leader>gy",
function()
Snacks.picker.lsp_type_definitions()
end,
desc = "Goto T[y]pe Definition",
},
{
"<leader>sw",
function()
Snacks.picker.lsp_workspace_symbols()
end,
desc = "LSP Workspace Symbols",
},
{
"<leader>ca",
function()
vim.lsp.buf.code_action()
end,
desc = "Code actions",
},
{
"<leader>rn",
function()
vim.lsp.buf.rename()
end,
desc = "Rename symbols",
},
-- Other
{
"<leader>z",
function()
Snacks.zen()
end,
desc = "Toggle Zen Mode",
},
{
"<leader>Z",
function()
Snacks.zen.zoom()
end,
desc = "Toggle Zoom",
},
{
"<leader>.",
function()
Snacks.scratch()
end,
desc = "Toggle Scratch Buffer",
},
{
"<leader>S",
function()
Snacks.scratch.select()
end,
desc = "Select Scratch Buffer",
},
{
"<leader>mv",
function()
Snacks.rename.rename_file()
end,
desc = "Move File",
},
{
"<leader>gg",
function()
Snacks.lazygit({ win = { width = 0, height = 0 } })
end,
desc = "Lazygit",
},
{
"<leader>un",
function()
Snacks.notifier.hide()
end,
desc = "Dismiss All Notifications",
},
{
"<c-_>",
function()
Snacks.terminal()
end,
desc = "which_key_ignore",
},
{
"]]",
function()
Snacks.words.jump(vim.v.count1)
end,
desc = "Next Reference",
mode = { "n", "t" },
},
{
"[[",
function()
Snacks.words.jump(-vim.v.count1)
end,
desc = "Prev Reference",
mode = { "n", "t" },
},
{
"<leader>N",
desc = "Neovim News",
function()
Snacks.win({
file = vim.api.nvim_get_runtime_file("doc/news.txt", false)[1],
width = 0.6,
height = 0.6,
wo = {
spell = false,
wrap = false,
signcolumn = "yes",
statuscolumn = " ",
conceallevel = 3,
},
})
end,
},
},
init = function()
vim.api.nvim_create_autocmd("User", {
pattern = "VeryLazy",
callback = function()
-- Setup some globals for debugging (lazy-loaded)
_G.dd = function(...)
Snacks.debug.inspect(...)
end
_G.bt = function()
Snacks.debug.backtrace()
end
vim.print = _G.dd -- Override print to use snacks for `:=` command
-- Create some toggle mappings
Snacks.toggle.option("spell", { name = "Spelling" }):map("<leader>us")
Snacks.toggle.option("wrap", { name = "Wrap" }):map("<leader>uw")
Snacks.toggle.option("relativenumber", { name = "Relative Number" }):map("<leader>uL")
Snacks.toggle.diagnostics():map("<leader>ud")
Snacks.toggle.line_number():map("<leader>ul")
Snacks.toggle
.option("conceallevel", { off = 0, on = vim.o.conceallevel > 0 and vim.o.conceallevel or 2 })
:map("<leader>uc")
Snacks.toggle.treesitter():map("<leader>uT")
Snacks.toggle
.option("background", { off = "light", on = "dark", name = "Dark Background" })
:map("<leader>ub")
Snacks.toggle.inlay_hints():map("<leader>uh")
Snacks.toggle.indent():map("<leader>ug")
Snacks.toggle.dim():map("<leader>uD")
end,
})
end,
}

View file

@ -0,0 +1,8 @@
return {
"kylechui/nvim-surround",
version = "*", -- Use for stability; omit to use `main` branch for the latest features
event = "VeryLazy",
config = function()
require("nvim-surround").setup({})
end,
}

View file

@ -0,0 +1,13 @@
return {
"folke/tokyonight.nvim",
priority = 1000, -- Make sure to load this before all the other start plugins.
init = function()
-- Load the colorscheme here.
-- Like many other themes, this one has different styles, and you could load
-- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'.
vim.cmd.colorscheme("tokyonight-night")
-- You can configure highlights by doing something like:
-- vim.cmd.hi("Comment gui=none")
end,
}

View file

@ -0,0 +1,41 @@
-- Highlight, edit, and navigate code
return {
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
config = function()
local configs = require("nvim-treesitter.configs")
configs.setup({
ensure_installed = {
"bash",
"c",
"diff",
"html",
"lua",
"luadoc",
"markdown",
"markdown_inline",
"query",
"vim",
"vimdoc",
"go",
"typescript",
"javascript",
"tsx",
},
auto_install = true,
sync_install = true,
highlight = { enable = true },
indent = { enable = true },
incremental_selection = {
enable = true,
keymaps = {
init_selection = "<CR>",
scope_incremental = "<CR>",
node_incremental = "<TAB>",
node_decremental = "<S-TAB>",
},
},
})
end,
}

View file

@ -0,0 +1,5 @@
return {
"pmizio/typescript-tools.nvim",
dependencies = { "nvim-lua/plenary.nvim", "neovim/nvim-lspconfig" },
opts = {},
}

View file

@ -0,0 +1,53 @@
-- Useful plugin to show you pending keybinds.
return {
"folke/which-key.nvim",
event = "VimEnter", -- Sets the loading event to 'VimEnter'
opts = {
icons = {
-- set icon mappings to true if you have a Nerd Font
mappings = vim.g.have_nerd_font,
-- If you are using a Nerd Font: set icons.keys to an empty table which will use the
-- default whick-key.nvim defined Nerd Font icons, otherwise define a string table
keys = vim.g.have_nerd_font and {} or {
Up = "<Up> ",
Down = "<Down> ",
Left = "<Left> ",
Right = "<Right> ",
C = "<C-…> ",
M = "<M-…> ",
D = "<D-…> ",
S = "<S-…> ",
CR = "<CR> ",
Esc = "<Esc> ",
ScrollWheelDown = "<ScrollWheelDown> ",
ScrollWheelUp = "<ScrollWheelUp> ",
NL = "<NL> ",
BS = "<BS> ",
Space = "<Space> ",
Tab = "<Tab> ",
F1 = "<F1>",
F2 = "<F2>",
F3 = "<F3>",
F4 = "<F4>",
F5 = "<F5>",
F6 = "<F6>",
F7 = "<F7>",
F8 = "<F8>",
F9 = "<F9>",
F10 = "<F10>",
F11 = "<F11>",
F12 = "<F12>",
},
},
-- Document existing key chains
spec = {
{ "<leader>c", group = "[C]ode", mode = { "n", "x" } },
{ "<leader>d", group = "[D]ocument" },
{ "<leader>r", group = "[R]ename" },
{ "<leader>s", group = "[S]earch" },
{ "<leader>w", group = "[W]orkspace" },
{ "<leader>h", group = "Git [H]unk", mode = { "n", "v" } },
},
},
}

View file

@ -0,0 +1,95 @@
local ls = require("luasnip")
local s = ls.snippet
local sn = ls.snippet_node
local isn = ls.indent_snippet_node
local t = ls.text_node
local i = ls.insert_node
local f = ls.function_node
local c = ls.choice_node
local d = ls.dynamic_node
local r = ls.restore_node
local events = require("luasnip.util.events")
local ai = require("luasnip.nodes.absolute_indexer")
local extras = require("luasnip.extras")
local l = extras.lambda
local rep = extras.rep
local p = extras.partial
local m = extras.match
local n = extras.nonempty
local dl = extras.dynamic_lambda
local fmt = require("luasnip.extras.fmt").fmt
local fmta = require("luasnip.extras.fmt").fmta
local conds = require("luasnip.extras.expand_conditions")
local postfix = require("luasnip.extras.postfix").postfix
local types = require("luasnip.util.types")
local parse = require("luasnip.util.parser").parse_snippet
local ms = ls.multi_snippet
local k = require("luasnip.nodes.key_indexer").new_key
-- lua snippets
ls.add_snippets("lua", {
s(
"lreq",
fmt('local {name} = require("{mod}{rep}")', {
name = i(1, "name"),
rep = rep(1),
mod = i(2),
})
),
})
-- js/ts/sx snippets
local allJsFts = {
"javascript",
"typescript",
"typescriptreact",
"javascriptreact",
}
local tsFts = {
"typescriptreact",
"typescript",
}
local import = s(
"im",
fmt("import {name} from '{module}';", {
module = i(1),
name = c(2, { i(1), fmt("{{{}}}", { i(1) }) }),
})
)
local field = s(
"fi",
fmt("{name}: {type};", {
name = i(1),
type = i(2),
})
)
local constF = s(
"cf",
fmt(
[[{export}const {name}{type} = ({args}){ret} => {{
{body}
}}]],
{
export = c(1, { t("export "), i(1) }),
name = i(2),
type = i(3),
args = i(3),
ret = i(4),
body = i(5),
}
)
)
for _, ft in ipairs(tsFts) do
ls.add_snippets(ft, {
constF,
field,
})
end
for _, ft in ipairs(allJsFts) do
ls.add_snippets(ft, {
import,
})
end

View file

@ -0,0 +1,7 @@
neovim
stdpath
tmux
formik
TODO
Autoformat
CTRL

20
.config/rofi/config.rasi Normal file
View file

@ -0,0 +1,20 @@
configuration {
matching: "fuzzy";
sort: true;
sorting-method: "fzf";
window-format: "{t}";
display-window: "";
display-combi: "";
monitor: -5;
timeout {
action: "kb-cancel";
delay: 0;
}
filebrowser {
directories-first: true;
sorting-method: "name";
}
}
@theme "squared-nord"

View file

@ -0,0 +1,104 @@
/*******************************************************************************
* ROFI SQUARED THEME USING THE NORD PALETTE
* User : LR-Tech
* Theme Repo : https://github.com/lr-tech/rofi-themes-collection
*******************************************************************************/
* {
font: "Iosevka Nerd Font 10";
bg0: #2E3440;
bg1: #3B4252;
fg0: #D8DEE9;
accent-color: #5e81ac;
urgent-color: #EBCB8B;
background-color: transparent;
text-color: @fg0;
margin: 0;
padding: 0;
spacing: 0;
}
entry {
cursor: pointer;
}
window {
location: center;
width: 480;
background-color: @bg0;
}
inputbar {
spacing: 8px;
padding: 8px;
background-color: @bg1;
children: [prompt, entry];
}
prompt, entry, element-icon, element-text {
vertical-align: 0.5;
}
prompt {
text-color: @accent-color;
}
textbox {
padding: 8px;
background-color: @bg1;
}
listview {
padding: 4px 0;
lines: 8;
columns: 1;
fixed-height: false;
}
element {
padding: 8px;
spacing: 8px;
}
element normal normal {
text-color: @fg0;
}
element normal urgent {
text-color: @urgent-color;
}
element normal active {
text-color: @accent-color;
}
element alternate active {
text-color: @accent-color;
}
element selected {
text-color: @fg0;
}
element selected normal, element selected active {
background-color: @accent-color;
}
element selected urgent {
background-color: @urgent-color;
}
element-icon {
size: 0.8em;
}
element-text {
text-color: inherit;
}

View file

@ -0,0 +1,24 @@
- 1.1.19
- _NAME: MX Master 3 Wireless Mouse
_absent: [hi-res-scroll, lowres-scroll-mode, scroll-ratchet-torque, onboard_profiles, report_rate, report_rate_extended, pointer_speed, dpi_extended,
speed-change, backlight, backlight_level, backlight_duration_hands_out, backlight_duration_hands_in, backlight_duration_powered, backlight-timed, led_control,
led_zone_, rgb_control, rgb_zone_, brightness_control, per-key-lighting, fn-swap, persistent-remappable-keys, disable-keyboard-keys, force-sensing,
crown-smooth, divert-crown, divert-gkeys, m-key-leds, mr-key-led, multiplatform, gesture2-gestures, gesture2-divert, gesture2-params, haptic-level,
haptic-play, sidetone, equalizer, adc_power_management]
_battery: 4096
_modelId: B02340820000
_sensitive: {hires-scroll-mode: ignore, hires-smooth-invert: false, hires-smooth-resolution: false}
_serial: B820926F
_unitId: B820926F
_wpid: '4082'
change-host: null
divert-keys: {82: 0, 83: 0, 86: 0, 195: 0, 196: 0}
dpi: 1000
hires-scroll-mode: false
hires-smooth-invert: false
hires-smooth-resolution: true
reprogrammable-keys: {80: 80, 81: 81, 82: 82, 83: 83, 86: 86, 195: 195, 196: 196}
scroll-ratchet: 2
smart-shift: 10
thumb-scroll-invert: false
thumb-scroll-mode: false

BIN
.config/sway/bg.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 646 KiB

294
.config/sway/config Normal file
View file

@ -0,0 +1,294 @@
### Interface
#
## Window decoration
# class border backgr. text indicator child_border
client.focused #5e81ac #5e81ac #eceff4 #5e81ac #5e81ac
client.focused_inactive #4c566a #2e3440 #d8dee9 #4c566a #2e3440
client.unfocused #4c566a #2e3440 #d8dee9 #4c566a #2e3440
client.urgent #bf616a #bf616a #2e3440 #5e81ac #bf616a
workspace_layout tabbed
# default_border normal
# default_floating_border none
font "Iosevka NF" 10
# titlebar_padding 1
# titlebar_border_thickness 1
smart_borders on
# gaps inner 0
# gaps outer 0
gaps top 10
for_window [app_id="kitty_shell"] floating enable, move center
### Variables
#
set $mod Mod4
set $left h
set $down j
set $up k
set $right l
set $term wezterm
set $browser firefox
set $clipboard copyq show
set $menu fish -c 'rofi -show run -terminal $term'
set $windows fish -c 'rofi -show window'
set $laptop eDP-1
set $typecmonitor DP-1
set $hdmi HDMI-A-1
### Output
#
output * bg ~/.config/sway/bg.jpg fill
# vertical hdmi
# output $hdmi {
# mode 3840x2160@59.940Hz
# pos 0 0
# transform 270
# scale 2.0
# adaptive_sync on
# }
# vertical laptop
# output $laptop {
# mode 2560x1600@240.0Hz
# pos 1080 1120
# transform normal
# scale 2.0
# adaptive_sync on
# }
# vertical type-c
output $typecmonitor {
mode 3840x2160@59.940Hz
pos 0 0
transform 270
scale 2.0
adaptive_sync on
}
# horizontal hdmi
output $hdmi {
mode 3840x2160@59.940Hz
pos 0 0
scale 2.0
adaptive_sync on
}
# horizontal laptop
output $laptop {
mode 2560x1600@240.0Hz
pos 1920 280
transform normal
scale 2.0
adaptive_sync on
}
bindswitch --reload --locked lid:on output $laptop disable
bindswitch --reload --locked lid:off output $laptop enable
workspace 1 output $typecmonitor
focus_on_window_activation focus
### Input configuration
input "type:touchpad" {
dwt enabled
dwtp enabled
tap enabled
natural_scroll enabled
tap_button_map lrm
}
input "type:pointer" {
natural_scroll enabled
}
input "type:keyboard" {
repeat_delay 400
repeat_rate 50
xkb_layout us,ru,ua
xkb_options "grp:caps_toggle"
}
#
# You can get the names of your inputs by running: swaymsg -t get_inputs
# Read `man 5 sway-input` for more information about this section.
### Key bindings
#
# Basics:
#
bindsym --to-code $mod+g exec $term -e fish -i -C y
bindsym --to-code $mod+Return exec $term
bindsym --to-code $mod+Shift+q kill
bindsym --to-code $mod+Space exec $menu
bindsym --to-code $mod+Tab exec $windows
bindsym --to-code Shift+Space exec $clipboard
bindsym --to-code $mod+Backspace exec ~/.scripts/kitty_shell.fish ~/.scripts/power.fish
bindsym --to-code $mod+Apostrophe exec ~/.scripts/shot.fish
# Drag floating windows by holding down $mod and left mouse button.
# Resize them with right mouse button + $mod.
# Despite the name, also works for non-floating windows.
# Change normal to inverse to use left mouse button for resizing and right
# mouse button for dragging.
floating_modifier $mod normal
# Reload the configuration file
bindsym --to-code $mod+Shift+c reload
# Exit sway (logs you out of your Wayland session)
bindsym --to-code $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'
#
# Moving around:
#
# Move your focus around
bindsym --to-code $mod+$left focus left
bindsym --to-code $mod+$down focus down
bindsym --to-code $mod+$up focus up
bindsym --to-code $mod+$right focus right
# Or use $mod+[up|down|left|right]
bindsym --to-code $mod+Left focus left
bindsym --to-code $mod+Down focus down
bindsym --to-code $mod+Up focus up
bindsym --to-code $mod+Right focus right
# Move the focused window with the same, but add Shift
bindsym --to-code $mod+Shift+$left move left
bindsym --to-code $mod+Shift+$down move down
bindsym --to-code $mod+Shift+$up move up
bindsym --to-code $mod+Shift+$right move right
# Ditto, with arrow keys
bindsym --to-code $mod+Shift+Left move left
bindsym --to-code $mod+Shift+Down move down
bindsym --to-code $mod+Shift+Up move up
bindsym --to-code $mod+Shift+Right move right
#
# Workspaces:
#
# Switch to workspace
bindsym --to-code $mod+1 workspace number 1
bindsym --to-code $mod+2 workspace number 2
bindsym --to-code $mod+3 workspace number 3
bindsym --to-code $mod+4 workspace number 4
bindsym --to-code $mod+5 workspace number 5
bindsym --to-code $mod+6 workspace number 6
bindsym --to-code $mod+7 workspace number 7
bindsym --to-code $mod+8 workspace number 8
bindsym --to-code $mod+9 workspace number 9
bindsym --to-code $mod+0 workspace number 10
# Move focused container to workspace
bindsym --to-code $mod+Shift+1 move container to workspace number 1
bindsym --to-code $mod+Shift+2 move container to workspace number 2
bindsym --to-code $mod+Shift+3 move container to workspace number 3
bindsym --to-code $mod+Shift+4 move container to workspace number 4
bindsym --to-code $mod+Shift+5 move container to workspace number 5
bindsym --to-code $mod+Shift+6 move container to workspace number 6
bindsym --to-code $mod+Shift+7 move container to workspace number 7
bindsym --to-code $mod+Shift+8 move container to workspace number 8
bindsym --to-code $mod+Shift+9 move container to workspace number 9
bindsym --to-code $mod+Shift+0 move container to workspace number 10
# Note: workspaces can have any name you want, not just numbers.
# We just use 1-10 as the default.
#
# Layout stuff:
#
# You can "split" the current object of your focus with
# $mod+b or $mod+v, for horizontal and vertical splits
# respectively.
bindsym --to-code $mod+b splith
bindsym --to-code $mod+v splitv
# Switch the current container between different layout styles
bindsym --to-code $mod+s layout stacking
bindsym --to-code $mod+w layout tabbed
bindsym --to-code $mod+e layout toggle split
# Make the current focus fullscreen
bindsym --to-code $mod+f fullscreen
# Toggle the current focus between tiling and floating mode
bindsym --to-code $mod+Shift+space floating toggle
# Swap focus between the tiling area and the floating area
bindsym --to-code $mod+z focus mode_toggle
# Move focus to the parent container
bindsym --to-code $mod+a focus parent
# Resizing containers:
#
mode "resize" {
# left will shrink the containers width
# right will grow the containers width
# up will shrink the containers height
# down will grow the containers height
bindsym --to-code $left resize shrink width 10px
bindsym --to-code $down resize grow height 10px
bindsym --to-code $up resize shrink height 10px
bindsym --to-code $right resize grow width 10px
# Ditto, with arrow keys
bindsym --to-code Left resize shrink width 10px
bindsym --to-code Down resize grow height 10px
bindsym --to-code Up resize shrink height 10px
bindsym --to-code Right resize grow width 10px
# Return to default mode
bindsym --to-code Return mode "default"
bindsym --to-code Escape mode "default"
}
bindsym --to-code $mod+r mode "resize"
### Autostart
#
exec udiskie -t
exec syncthing serve
exec swaylock
exec tuxedo-control-center --tray
exec swaykbdd
exec copyq
### Idle configuration
#
exec ~/.scripts/idle.fish
# Include configs from 3 locations:
# - /usr/share/sway/config.d
# - /etc/sway/config.d
# - $XDG_CONFIG_HOME/sway/config.d ($HOME/.config/sway/config.d)
#
# If multiple directories contain the files with the same name, the later
# directory takes precedence; `$XDG_CONFIG_HOME/sway/config.d/20-swayidle.conf`
# will always be loaded instead of `/usr/share/sway/config.d/20-swayidle.conf`
# or `/etc/sway/config.d/20-swayidle.conf`
#
# This mechanism permits overriding our default configuration per-system
# (/etc) or per-user ($XDG_CONFIG_HOME) basis. Just create the file you
# want to modify/override in the higher-level directory.
#
# For example, to disable the default bar from Fedora configs, you'll need to
# $ echo -n > "$HOME/.config/sway/config.d/90-bar.conf"
#
# Note the quoting, the $() and the arguments quoting. All the parts are equally
# important to make the magic work. And if you want to learn the secret behind
# the trick, it's all in the `wordexp(3)`.
#
include '$(/usr/libexec/sway/layered-include "/usr/share/sway/config.d/*.conf" "/etc/sway/config.d/*.conf" "${XDG_CONFIG_HOME:-$HOME/.config}/sway/config.d/*.conf")'

167
.config/swaylock/config Normal file
View file

@ -0,0 +1,167 @@
##############
# SWAYLOCK #
##############
# Path to the config file
# config=<config_file>
# Turn the screen into the given color instead of white
color=2e3440ff
# Enable debugging output
# debug
# When an empty password is provided by the user, do not validate it
ignore-empty-password
# Show the number of failed authentication attempts on the indicator
show-failed-attempts
# Detach from the controlling terminal after locking
# Note: this is the default behavior of i3lock
# daemonize
# Display the given image
# image [[<output>]:]<path>
# Display the current xkb layout while typing
show-keyboard-layout
# Force hiding the current xkb layout while typing, even if more than one layout
# is configured or the show-keyboard-layout option is set
# hide-keyboard-layout
# Disable the Caps Lock Text
# disable-caps-lock-text
# Show the current Caps Lock state also on the indicator
# indicator-caps-lock
# Image scaling mode: 'stretch', 'fill', 'fit', 'center', 'tile' & 'solid\color'
# scaling
# Same as scaling=tile
# tiling
# Disable the unlock indicator
# no-unlock-indicator
# Sets the color of backspace highlight segments
bs-hl-color=b48eadff
# Sets the color of backspace highlight segments when Caps Lock is active
caps-lock-bs-hl-color=d08770ff
# Sets the color of the key press highlight segments when Caps Lock is active
caps-lock-key-hl-color=ebcb8bff
# Sets the font of the text
font=Fira Sans Light
# FUTURE RELEASE
# Sets a fixed font size for the indicator text
# font-size=<size>
# FUTURE RELEASE
# Sets the indicator to show even if idle
# indicator-idle-visible
# Sets the indicator radius (default: 50)
indicator-radius=100
# Sets the indicator thickness (default: 10)
indicator-thickness=10
# FUTURE RELEASE
# Sets the horizontal position of the indicator
# indicator-x-position
# FUTURE RELEASE
# Sets the vertical position of the indicator
# indicator-y-position
# Sets the color of the inside of the indicator
inside-color=2e3440ff
# Sets the color of the inside of the indicator when cleared
inside-clear-color=81a1c1ff
# Sets the color of the inside of the indicator when Caps Lock is active
# inside-caps-lock-color=<rrggbb[aa]>
# Sets the color of the inside of the indicator when verifying
inside-ver-color=5e81acff
# Sets the color of the inside of the indicator when invalid
inside-wrong-color=bf616aff
# Sets the color of key press highlight segments
key-hl-color=a3be8cff
# Sets the background color of the box containing the layout text
layout-bg-color=2e3440ff
# Sets the color of the border of the box containing the layout text
# layout-border-color=<rrggbb[aa]>
# Sets the color of the layout text
# layout-text-color=<rrggbb[aa]>
# Sets the color of the line between the inside and ring
# line-color=<rrggbb[aa]>
# Sets the color of the line between the inside and ring when cleared
# line-clear-color=<rrggbb[aa]>
# Sets the color of the line between the inside and ring when Caps Lock is active
# line-caps-lock-color=<rrggbb[aa]>
# Sets the color of the line between the inside and ring when verifying
# line-ver-color=<rrggbb[aa]>
# Sets the color of the line between the inside and ring when invalid
# line-wrong-color=<rrggbb[aa]>
# Use the inside color for the line between the inside and ring
# line-uses-inside
# Use the ring color for the line between the inside and ring
line-uses-ring
# Sets the color of the outside of the indicator when typing or idle
ring-color=3b4252ff
# Sets the color of the outside of the indicator when cleared
ring-clear-color=88c0d0ff
# Sets the color of the ring of the indicator when Caps Lock is active
# ring-caps-lock-color=<rrggbb[aa]>
# Sets the color of the outside of the indicator when verifying
ring-ver-color=81a1c1ff
# Sets the color of the outside of the indicator when invalid
ring-wrong-color=d08770ff
# Sets the color of the lines that separate highlight segments
separator-color=3b4252ff
# Sets the color of the text
text-color=eceff4ff
# Sets the color of the text when cleared
text-clear-color=3b4252ff
# Sets the color of the text when Caps Lock is active
# text-caps-lock-color=<rrggbb[aa]>
# Sets the color of the text when verifying
text-ver-color=3b4252ff
# Sets the color of the text when invalid
text-wrong-color=3b4252ff
image=~/.config/sway/bg.jpg
scaling=fill

96
.config/waybar/config Normal file
View file

@ -0,0 +1,96 @@
{
"height": 35,
"modules-left": [
"sway/workspaces",
"sway/mode",
"sway/window"
],
"modules-center": [],
"modules-right": [
"idle_inhibitor",
"pulseaudio",
"backlight",
"network",
"battery",
"clock",
"tray",
"sway/language"
],
"sway/mode": {
"format": "<span style=\"italic\">{}</span>"
},
"sway/window": {
"max-length": 50
},
"tray": {
"spacing": 10
},
"clock": {
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
"format": " {:%Y-%m-%d %H:%M}"
},
"backlight": {
"format": "{icon} {percent}%",
"format-icons": [
"",
""
]
},
"battery": {
"states": {
"warning": 30,
"critical": 15
},
"format": "{icon} {capacity}%",
"format-charging": " {capacity}%",
"format-plugged": " {capacity}%",
"format-alt": "{time} {icon}",
"format-icons": [
"",
"",
"",
"",
""
]
},
"network": {
"format-wifi": " ({signalStrength}%)",
"format-ethernet": " {ipaddr}",
"format-linked": " {ifname} (No IP)",
"format-disconnected": "⚠ Disconnected"
},
"pulseaudio": {
"format": "{icon} {volume}% {format_source}",
"format-bluetooth": "{volume}% {icon} {format_source}",
"format-bluetooth-muted": " {icon} {format_source}",
"format-muted": " {format_source}",
"format-source": " {volume}%",
"format-source-muted": "󰍭",
"format-icons": {
"headphone": "",
"hands-free": "",
"headset": "",
"phone": "",
"portable": "",
"car": "",
"default": [
"",
"",
""
]
},
"on-click": "pavucontrol"
},
"sway/language": {
"format": "{flag}",
"on-click": "swaymsg input type:keyboard xkb_switch_layout next"
},
"idle_inhibitor": {
"start-activated": true,
"format": " {icon} ",
"format-icons": {
"activated": "",
"deactivated": ""
}
}
}

25
.config/waybar/nord.css Normal file
View file

@ -0,0 +1,25 @@
/*
* Nord theme
* src : https://www.nordtheme.com/docs/colors-and-palettes
*/
/* Polar Night */
@define-color nord0 #2e3440;
@define-color nord1 #3b4252;
@define-color nord2 #434c5e;
@define-color nord3 #4c566a;
/* Snow storm */
@define-color nord4 #d8dee9;
@define-color nord5 #e5e9f0;
@define-color nord6 #eceff4;
/* Frost */
@define-color nord7 #8fbcbb;
@define-color nord8 #88c0d0;
@define-color nord9 #81a1c1;
@define-color nord10 #5e81ac;
/* Aurora */
@define-color nord11 #bf616a;
@define-color nord12 #d08770;
@define-color nord13 #ebcb8b;
@define-color nord14 #a3be8c;
@define-color nord15 #b48ead;

137
.config/waybar/style.css Normal file
View file

@ -0,0 +1,137 @@
@import "nord.css";
window {
background-color: transparent;
}
* {
font-family: Iosevka NF;
font-size: 14px;
font-weight: 600;
margin-top: 2px;
}
/*
* Left part
*/
#mode {
color: @nord0;
background-color: @nord13;
margin-left: 8px;
border-radius: 5px;
padding: 0px 6px;
}
#workspaces button {
margin-left: 8px;
background-color: @nord3;
padding: 0px 4px;
color: @nord6;
margin-top: 0;
}
#workspaces button.focused {
color: @nord6;
background-color: @nord10;
}
#window {
margin-left: 10px;
color: @nord6;
font-weight: bold;
padding: 0px 5px;
}
/*
* Right part
*/
#idle_inhibitor,
#pulseaudio,
#network,
#cpu,
#memory,
#backlight,
#language,
#keyboard-state,
#battery,
#clock,
#tray {
background-color: @nord2;
padding: 0px 8px;
color: @nord6;
}
#idle_inhibitor,
#backlight,
#language,
#battery,
#clock,
#tray {
margin-right: 8px;
border-top-right-radius: 5px;
border-bottom-right-radius: 5px;
}
#idle_inhibitor,
#pulseaudio,
#network,
#clock,
#tray {
border-top-left-radius: 5px;
border-bottom-left-radius: 5px;
}
#idle_inhibitor.activated {
background-color: @nord10;
}
#backlight,
#battery {
padding-left: 0px;
}
#pulseaudio.muted {
background-color: @nord13;
color: @nord3;
}
#pulseaudio, #backlight {
background-color: @nord10;
}
#network, #cpu, #memory, #battery {
background-color: @nord3;
}
#tray {
background-color: @nord1;
}
#network.disabled,
#network.disconnected {
background-color: @nord13;
color: @nord0;
}
#battery.warning {
background-color: @nord13;
color: @nord0;
}
#battery.critical {
background-color: @nord11;
color: @nord0;
}
#tray menu {
background-color: @nord2;
color: @nord4;
padding: 10px 5px;
border: 2px solid @nord1;
}
#language {
min-width: 20px;
border-radius: 5px;
}

View file

@ -0,0 +1,49 @@
-- Pull in the wezterm API
local wezterm = require("wezterm")
local act = wezterm.action
-- This will hold the configuration.
local config = wezterm.config_builder()
-- For example, changing the color scheme:
config.color_scheme = "tokyonight_night"
config.alternate_buffer_wheel_scroll_speed = 10
-- Change mouse scroll amount
config.mouse_bindings = {
{
event = { Down = { streak = 1, button = { WheelUp = 1 } } },
mods = "NONE",
action = act.ScrollByLine(-10),
},
{
event = { Down = { streak = 1, button = { WheelDown = 1 } } },
mods = "NONE",
action = act.ScrollByLine(10),
},
}
config.font = wezterm.font({ family = "Iosevka Nerd Font", weight = "Regular", style = "Italic" })
config.font_size = 11
config.use_fancy_tab_bar = false
config.hide_tab_bar_if_only_one_tab = true
config.window_padding = {
left = 0,
right = 0,
top = 0,
bottom = 0,
}
config.keys = {
{ key = "v", mods = "CTRL", action = wezterm.action.PasteFrom("Clipboard") },
{ key = "c", mods = "CTRL", action = wezterm.action.CopyTo("ClipboardAndPrimarySelection") },
{ key = "C", mods = "CTRL", action = wezterm.action.SendString("\x03") },
{
key = "Enter",
mods = "ALT",
action = wezterm.action.DisableDefaultAssignment,
},
}
-- and finally, return the configuration to wezterm
return config

3
.config/yazi/init.lua Normal file
View file

@ -0,0 +1,3 @@
require("zoxide"):setup {
update_db = true,
}

9
.config/yazi/keymap.toml Normal file
View file

@ -0,0 +1,9 @@
[[manager.prepend_keymap]]
on = "!"
run = 'shell "$SHELL" --block --confirm'
desc = "Open shell here"
[[input.prepend_keymap]]
on = "<Esc>"
run = "close"
desc = "Cancel input"

4
.config/yazi/yazi.toml Normal file
View file

@ -0,0 +1,4 @@
# yazi.toml
[manager]
show_hidden = true