Compare commits

...

9 Commits

Author SHA1 Message Date
Bryan 839533c184 lnk: sync configuration files 2025-08-25 08:44:46 -06:00
Bryan 252d65e951 lnk: added install-plugins 2025-08-25 08:37:44 -06:00
Bryan 6fb686ece5 lnk: added 3 files 2025-08-25 08:36:59 -06:00
Bryan 592a74c067 lnk: added qalc.cfg 2025-08-25 08:30:48 -06:00
Bryan 3784b40400 lnk: added kitty 2025-08-25 08:27:31 -06:00
Bryan 1839e4f146 lnk: added glow 2025-08-25 08:25:45 -06:00
Bryan 98f5f44a99 lnk: added cortile 2025-08-25 07:34:53 -06:00
Bryan 4962271c7f lnk: added starship.toml 2025-08-25 07:11:41 -06:00
Bryan 7c6e470833 lnk: added config.yaml 2025-08-24 07:40:06 -06:00
22 changed files with 6517 additions and 6 deletions

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

@ -0,0 +1,9 @@
# style name or JSON path (default "auto")
# style: "/home/bryan/.config/glow/tokyo.json"
style: "auto"
# mouse support (TUI-mode only)
mouse: false
# use pager to display markdown
pager: false
# word-wrap at width
width: 80

182
.config/glow/tokyo.json Normal file
View File

@ -0,0 +1,182 @@
{
"document": {
"block_prefix": "\n",
"block_suffix": "\n",
"color": "#a9b1d6",
"margin": 2
},
"block_quote": {
"indent": 1,
"indent_token": "│ "
},
"paragraph": {},
"list": {
"color": "#a9b1d6",
"level_indent": 2
},
"heading": {
"block_suffix": "\n",
"color": "#bb9af7",
"bold": true
},
"h1": {
"prefix": "# ",
"bold": true
},
"h2": {
"prefix": "## "
},
"h3": {
"prefix": "### "
},
"h4": {
"prefix": "#### "
},
"h5": {
"prefix": "##### "
},
"h6": {
"prefix": "###### "
},
"text": {},
"strikethrough": {
"crossed_out": true
},
"emph": {
"italic": true
},
"strong": {
"bold": true
},
"hr": {
"color": "#565f89",
"format": "\n--------\n"
},
"item": {
"block_prefix": "• "
},
"enumeration": {
"block_prefix": ". ",
"color": "#7aa2f7"
},
"task": {
"ticked": "[✓] ",
"unticked": "[ ] "
},
"link": {
"color": "#7aa2f7",
"underline": true
},
"link_text": {
"color": "#2ac3de"
},
"image": {
"color": "#7aa2f7",
"underline": true
},
"image_text": {
"color": "#2ac3de",
"format": "Image: {{.text}} →"
},
"code": {
"color": "#9ece6a"
},
"code_block": {
"color": "#ff9e64",
"margin": 2,
"chroma": {
"text": {
"color": "#a9b1d6"
},
"error": {
"color": "#a9b1d6",
"background_color": "#f7768e"
},
"comment": {
"color": "#565f89"
},
"comment_preproc": {
"color": "#2ac3de"
},
"keyword": {
"color": "#2ac3de"
},
"keyword_reserved": {
"color": "#2ac3de"
},
"keyword_namespace": {
"color": "#2ac3de"
},
"keyword_type": {
"color": "#7aa2f7"
},
"operator": {
"color": "#2ac3de"
},
"punctuation": {
"color": "#a9b1d6"
},
"name": {
"color": "#7aa2f7"
},
"name_builtin": {
"color": "#7aa2f7"
},
"name_tag": {
"color": "#2ac3de"
},
"name_attribute": {
"color": "#9ece6a"
},
"name_class": {
"color": "#7aa2f7"
},
"name_constant": {
"color": "#bb9af7"
},
"name_decorator": {
"color": "#9ece6a"
},
"name_exception": {},
"name_function": {
"color": "#9ece6a"
},
"name_other": {},
"literal": {},
"literal_number": {},
"literal_date": {},
"literal_string": {
"color": "#e0af68"
},
"literal_string_escape": {
"color": "#2ac3de"
},
"generic_deleted": {
"color": "#f7768e"
},
"generic_emph": {
"italic": true
},
"generic_inserted": {
"color": "#9ece6a"
},
"generic_strong": {
"bold": true
},
"generic_subheading": {
"color": "#bb9af7"
},
"background": {
"background_color": "#1a1b26"
}
}
},
"table": {},
"definition_list": {},
"definition_term": {},
"definition_description": {
"block_prefix": "\n🠶 "
},
"html_block": {},
"html_span": {}
}

223
.config/ov/config.yaml Normal file
View File

@ -0,0 +1,223 @@
# This is the ov config file.
# Copy it to `$XDG_CONFIG_HOME/ov/config.yaml` or start it with `ov --config ov.yaml`.
#
# CaseSensitive: false
# SmartCaseSensitive: false
# RegexpSearch: false
# Incsearch: true
# BeforeWriteOriginal: 1000
# AfterWriteOriginal: 0
# MemoryLimit: 10000
# Prompt:
# Normal:
# ShowFilename: true
# InvertColor: true
General:
TabWidth: 8
Header: 0
AlternateRows: false
ColumnMode: false
LineNumMode: false
WrapMode: true
ColumnDelimiter: ","
MarkStyleWidth: 1
# Style
# String of the color name: Foreground, Background
# Boolean: Bold, Blink, Dim, Italic, Underline
StyleAlternate:
Background: "gray"
StyleHeader:
Bold: true
StyleOverStrike:
Bold: true
StyleOverLine:
Underline: true
StyleLineNumber:
Bold: true
StyleSearchHighlight:
Reverse: true
StyleColumnHighlight:
Reverse: true
StyleMarkLine:
Background: "darkgoldenrod"
StyleSectionLine:
Background: "darkslategray"
StyleMultiColorHighlight:
- Foreground: "red"
- Foreground: "aqua"
- Foreground: "yellow"
- Foreground: "fuchsia"
- Foreground: "lime"
- Foreground: "blue"
- Foreground: "grey"
StyleJumpTargetLine:
Underline: true
# Keybind
# Special key
# "Enter","Backspace","Tab","Backtab","Esc",
# "Backspace2", "Delete", "Insert",
# "Up", "Down", "Left", "Right", "Home", "End",
# "F1...F64"
# Modifier key
# "ctrl", "alt", "meta", "shift"
# Connect with modifier key + key
# "ctrl+c"
KeyBind:
exit:
- "Escape"
- "q"
cancel:
- "ctrl+c"
write_exit:
- "Q"
set_write_exit:
- "ctrl+q"
suspend:
- "ctrl+z"
sync:
- "ctrl+l"
reload:
- "ctrl+alt+l"
- "F5"
watch:
- "ctrl+alt+w"
- "F4"
watch_interval:
- "ctrl+w"
follow_mode:
- "ctrl+f"
follow_all:
- "ctrl+a"
follow_section:
- "F2"
help:
- "h"
- "ctrl+alt+c"
- "ctrl+f1"
logdoc:
- "ctrl+f2"
- "ctrl+alt+e"
down:
- "Enter"
- "Down"
- "ctrl+N"
- "j"
up:
- "Up"
- "ctrl+p"
- "k"
top:
- "Home"
- "g"
bottom:
- "End"
- "G"
left:
- "left"
right:
- "right"
half_left:
- "ctrl+left"
half_right:
- "ctrl+right"
page_up:
- "PageUp"
- "ctrl+b"
- "b"
page_down:
- "PageDown"
- "ctrl+v"
- "ctrl+f"
- "f"
page_half_up:
- "ctrl+u"
- "K"
- "u"
page_half_down:
- "ctrl+d"
- "J"
- "d"
section_delimiter:
- "alt+d"
section_start:
- "ctrl+F3"
- "alt+s"
next_section:
- "space"
last_section:
- "9"
previous_section:
- "^"
mark:
- "m"
remove_mark:
- "M"
- "ctrl+m"
remove_all_mark:
- "ctrl+delete"
next_mark:
- ">"
previous_mark:
- "<"
set_view_mode:
- "p"
- "P"
alter_rows_mode:
- "C"
line_number_mode:
- "#"
search:
- "/"
wrap_mode:
- "w"
- "W"
column_mode:
- "c"
backsearch:
- "?"
delimiter:
- "d"
header:
- "H"
skip_lines:
- "ctrl+s"
tabwidth:
- "t"
goto:
- "o"
next_search:
- "n"
next_backsearch:
- "N"
next_doc:
- "]"
previous_doc:
- "["
toggle_mouse:
- "ctrl+f3"
- "ctrl+alt+r"
multi_color:
- "."
jump_target:
- "T"
Mode:
Psql:
Header: 2
AlternateRows: true
ColumnMode: true
LineNumMode: false
WrapMode: true
ColumnDelimiter: "|"
Mysql:
Header: 3
AlternateRows: true
ColumnMode: true
LineNumMode: false
WrapMode: true
ColumnDelimiter: "|"
man:
SectionDelimiter: "^[a-z][A-Z]"

View File

@ -0,0 +1,84 @@
[General]
version=4.9.0
save_mode_on_exit=1
save_definitions_on_exit=1
clear_history_on_exit=0
ignore_locale=0
colorize=1
auto_update_exchange_rates=-1
spacious=1
vertical_space=1
excessive_parenthesis=0
short_multiplication=1
use_unicode_signs=1
use_unicode_exponents=1
lower_case_numbers=0
duodecimal_symbols=0
lower_case_e=0
imaginary_j=0
base_display=1
twos_complement=1
hexadecimal_twos_complement=0
spell_out_logical_operators=1
digit_grouping=0
decimal_comma=-1
dot_as_separator=-1
comma_as_separator=0
multiplication_sign=2
division_sign=0
[Mode]
min_deci=0
use_min_deci=0
max_deci=2
use_max_deci=0
precision=10
interval_arithmetic=1
interval_display=0
min_exp=-1
negative_exponents=0
sort_minus_last=1
number_fraction_format=-1
complex_number_form=0
use_prefixes=1
use_prefixes_for_all_units=0
use_prefixes_for_currencies=0
use_binary_prefixes=0
abbreviate_names=1
all_prefixes_enabled=0
denominator_prefix_enabled=1
place_units_separately=1
auto_post_conversion=3
mixed_units_conversion=3
local_currency_conversion=1
number_base=10
number_base_expression=10
read_precision=0
assume_denominators_nonzero=1
warn_about_denominators_assumed_nonzero=1
structuring=1
angle_unit=1
caret_as_xor=0
concise_uncertainty_input=0
functions_enabled=1
variables_enabled=1
calculate_variables=1
calculate_functions=1
variable_units_enabled=1
sync_units=1
unknownvariables_enabled=0
units_enabled=1
allow_complex=1
allow_infinite=1
indicate_infinite_series=0
show_ending_zeroes=1
rounding_mode=0
approximation=-1
interval_calculation=1
in_rpn_mode=0
rpn_syntax=0
limit_implicit_multiplication=0
parsing_mode=0
default_assumption_type=4
default_assumption_sign=0

95
.config/starship.toml Normal file
View File

@ -0,0 +1,95 @@
# https://github.com/starship/starship/discussions/1107
# Pills
add_newline = true
palette = "default"
format = """
[](fg:separator)\
$status\
$directory\
$git_branch\
$git_status\
$cmd_duration\
$time\
$line_break\
[](fg:separator)\
$character\
"""
###########################################
[palettes.default]
prompt_ok = "#8047c1"
prompt_err = "#e23140"
icon = "#161514"
separator = "#35312c"
background = "#35312c"
directory = "#9f31e2"
duration = "#e26f31"
status = "#e23140"
git_branch = "#31e268"
git_status = "#31e268"
###########################################
[character]
success_symbol = "[](fg:prompt_ok)"
error_symbol = "[](fg:prompt_err)"
vimcmd_symbol = "[](fg:git_status)"
vimcmd_replace_one_symbol = "[](bold purple)"
vimcmd_replace_symbol = "[](bold purple)"
vimcmd_visual_symbol = "[](bold yellow)"
[status]
format = "[─](fg:separator)[](fg:status)[](fg:icon bg:status)[](fg:status bg:background)[ $status](bg:background)[](fg:background)"
pipestatus = true
pipestatus_separator = "-"
pipestatus_segment_format = "$status"
pipestatus_format = "[─](fg:separator)[](fg:status)[](fg:icon bg:status)[](fg:status bg:background)[ $pipestatus](bg:background)[](fg:background)"
disabled = false
[directory]
format = "[─](fg:separator)[](fg:directory)[](fg:icon bg:directory)[](fg:directory bg:background)[ $path](bg:background)[](fg:background)"
truncate_to_repo = false
truncation_length = 0
[directory.substitutions]
"Documents" = "󰈙"
"Downloads" = ""
"Music" = "󰝚"
"Pictures" = ""
"Repos" = "󰲋"
[git_branch]
format = "[─](fg:separator)[](fg:git_branch)[ ](fg:icon bg:git_branch)[](fg:git_branch bg:background)[ $branch](bg:background)"
[git_status]
modified = " "
untracked = " "
renamed = " "
deleted = " "
staged = " "
stashed = " "
ahead = '⇡${count}'
diverged = '⇕⇡${ahead_count}⇣${behind_count}'
behind = '⇣${count}'
# modified = ""
# untracked = ""
# renamed = "󰜴"
# deleted = " "
# staged = " "
format = "[ ](fg:background bg:git_status)[$all_status$ahead_behind](fg:icon bg:git_status)[](fg:git_status)"
[cmd_duration]
format = "[─](fg:separator)[](fg:duration)[󱐋](fg:icon bg:duration)[](fg:duration bg:background)[ $duration](bg:background)[](fg:background)"
min_time = 1000
[time]
format = "[─](fg:separator)[](fg:duration)[󰥔](fg:icon bg:duration)[](fg:duration bg:background)[ $time](bg:background)[](fg:background)"
disabled = true

4
.config/yazi/install-plugins Executable file
View File

@ -0,0 +1,4 @@
#!/bin/bash
[ -d "/home/bryan/.config/yazi/plugins/easyjump.yazi" ] || git clone https://gitee.com/DreamMaoMao/easyjump.yazi.git ~/.config/yazi/plugins/easyjump.yazi
[ -d "/home/bryan/.config/yazi/plugins/fg.yazi" ] || git clone https://gitee.com/DreamMaoMao/fg.yazi.git ~/.config/yazi/plugins/fg.yazi

5
.lnk
View File

@ -1,4 +1,9 @@
.config/glow
.config/ov/config.yaml
.config/qalculate/qalc.cfg
.config/starship.toml
.config/stew/stew.config.json
.config/yazi/install-plugins
.local/share/stew/Stewfile.lock.json
.zsh_plugins.txt
.zsh_plugins.zsh

5
.lnk.pc Normal file
View File

@ -0,0 +1,5 @@
.config/cortile
.config/kitty
.config/yazi/keymap.toml
.config/yazi/theme.toml
.config/yazi/yazi.toml

View File

@ -58,7 +58,7 @@
"repo": "jaq",
"tag": "v2.3.0",
"asset": "jaq-x86_64-unknown-linux-gnu",
"binary": "y",
"binary": "jaq",
"url": "https://api.github.com/repos/01mf02/jaq/releases/assets/270729531",
"binaryHash": "099b8bb519f5ab4a3dc3c1ddedd50770a9cd8cf64129c8de6353572b6f18007a"
},

View File

@ -14,11 +14,11 @@ alias less=ov
alias fd=fdfind
# Use eza as ls
alias la="eza -a --sort time"
alias ls="eza --sort time"
alias ll="eza -l --sort time"
alias lsd="eza -D"
alias lsf="eza -f"
alias la="eza -a --sort time --group-directories-first"
alias ls="eza --sort time --group-directories-first"
alias ll="eza -l --sort time --group-directories-first"
alias lsd="eza -D --sort time"
alias lsf="eza -f --sort time"
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'

View File

@ -0,0 +1,269 @@
################################################################################
# #
# https://github.com/leukipp/cortile/blob/main/config.toml #
# #
################################################################################
#################################### Tiling ####################################
# Initial tiling activation, will be cached afterwards (true | false).
tiling_enabled = true
# Initial tiling layout, will be cached afterwards ("vertical-left" | "vertical-right" | "horizontal-top" | "horizontal-bottom" | "maximized" | "fullscreen").
tiling_layout = "vertical-left"
# List of tiling layouts used for next/previous layout cycle ([] = default).
tiling_cycle = [
"vertical-left",
"vertical-right",
"horizontal-top",
"horizontal-bottom",
]
# An overlay window is displayed for this time period [ms] when the layout was changed (0 = disabled).
tiling_gui = 1500
# Menu entries in systray which shows the tiling state as icon ([] = disabled).
# tiling_icon = [
# ["ACTION", "TEXT"] = ["action strings from [keys] section", "text to show in the menu"],
# ["", ""] = "show a separator line",
# ]
tiling_icon = [
["toggle", "Enabled"],
["decoration", "Decoration"],
["", ""],
["master_increase", "Add Master"],
["master_decrease", "Remove Master"],
["", ""],
["slave_increase", "Add Slave"],
["slave_decrease", "Remove Slave"],
["", ""],
["reset", "Reset"],
["", ""],
["exit", "Exit"],
]
#################################### Window ####################################
# Regex RE2 syntax to ignore windows (WM_CLASS string can be found by running `xprop WM_CLASS`).
# window_ignore = [
# ["WM_CLASS", "WM_NAME"] = ["ignore all windows with this class", "but allow those with this name"]
# ]
window_ignore = [
["nm.*", ""],
["gcr.*", ""],
["polkit.*", ""],
["wrapper.*", ""],
["lightdm.*", ""],
["blueman.*", ""],
["pavucontrol.*", ""],
["firefox.*", ".*Mozilla Firefox"],
[".*settings", ""],
["pcmanfm-qt.*", ""],
["keepassxc.*", ""],
[".*conf.*", ""],
]
# Maximum number of allowed master windows (0 - 5).
window_masters_max = 2
# Maximum number of allowed slave windows (1 - 5).
window_slaves_max = 3
# How much space should be left between windows (0 - 100).
window_gap_size = 0
# When hovered for this duration [ms] windows are focused (0 = disabled).
window_focus_delay = 0
# Initial rendering of window decorations, will be cached afterwards (true | false).
window_decoration = true
################################## Proportion ##################################
# How much to increment/decrement master-slave area (0.0 - 1.0).
proportion_step = 0.05
# Minimum window width/height in proportion to workspace (0.0 - 1.0).
proportion_min = 0.2
##################################### Edge #####################################
# Margin of the tiling area ([top, right, bottom, left]).
edge_margin = [0, 0, 0, 0]
# Margin of the tiling area on primary screen ([top, right, bottom, left]).
edge_margin_primary = [0, 0, 0, 0]
# Width and height of a hot-corner area within the edge corners (0 - 100).
edge_corner_size = 10
# Width or height of a hot-corner area within the edge centers (0 - 100).
edge_center_size = 100
################################################################################
[colors] # RGBA color values used for ui elements. #
################################################################################
# Window text color.
gui_text = [255, 255, 255, 255]
# Window background color.
gui_background = [30, 30, 40, 255]
# Slave client layout color.
gui_client_slave = [58, 58, 78, 255]
# Master client layout color.
gui_client_master = [98, 98, 128, 255]
# Systray icon background color.
icon_background = [0, 0, 0, 0]
# Systray icon foreground color.
icon_foreground = [255, 255, 255, 255]
################################################################################
[keys] # Key symbols can be found by running `xev`. #
################################################################################
# Enable tiling on the current screen (Home = Fn_Left).
enable = "Control-Shift-Home"
# Disable tiling on the current screen (End = Fn_Right).
disable = "Control-Shift-End"
# Toggle between enable and disable on the current screen.
# toggle = "Control-Shift-T"
toggle = ""
# Toggle window decoration on and off on the current screen.
decoration = "Control-Shift-D"
# Disable tiling and restore windows on the current screen.
restore = "Control-Shift-R"
# Reset layouts to default proportions (BackSpace = Delete_Left)
reset = "Control-Shift-BackSpace"
# Cycles through next layouts (Next = Page_Down).
cycle_next = "Control-Shift-Next"
# Cycles through previous layouts (Prior = Page_Up).
cycle_previous = "Control-Shift-Prior"
# Activates the vertical-left layout (Left = Arrow_Left).
layout_vertical_left = "Control-Shift-Left"
# Activates the vertical-right layout (Right = Arrow_Right).
layout_vertical_right = "Control-Shift-Right"
# Activates the horizontal-top layout (Up = Arrow_Up).
layout_horizontal_top = "Control-Shift-Up"
# Activates the horizontal-bottom layout (Down = Arrow_Down).
layout_horizontal_bottom = "Control-Shift-Down"
# Activates the maximized layout (Space = Blank).
layout_maximized = "Control-Shift-M"
# Activates the fullscreen layout (Return = Enter).
layout_fullscreen = "Control-Shift-F"
# Increase the number of slaves (Plus = +).
slave_increase = "Control-Shift-Plus"
# Decrease the number of slaves (Minus = -).
slave_decrease = "Control-Shift-Minus"
# Increase the number of masters (KP_Add = Num_+).
master_increase = "Control-Shift-KP_Add"
# Decrease the number of masters (KP_Subtract = Num_-).
master_decrease = "Control-Shift-KP_Subtract"
# Move focus to the next window (KP_2 = Num_2).
window_next = "Control-Shift-KP_2"
# Move focus to the previous window (KP_8 = Num_8).
window_previous = "Control-Shift-KP_8"
# Move the active window to the next screen (KP_9 = Num_9).
screen_next = "Control-Shift-KP_9"
# Move the active window to the previous screen (KP_7 = Num_7).
screen_previous = "Control-Shift-KP_7"
# Make the active window a master (KP_5 = Num_5).
master_make = "Control-Shift-KP_5"
# Make the next window a master (KP_6 = Num_6).
master_make_next = "Control-Shift-KP_6"
# Make the previous window a master (KP_4 = Num_4).
master_make_previous = "Control-Shift-KP_4"
# Increase the proportion of master-slave area (KP_3 = Num_3).
proportion_increase = "Control-Shift-KP_3"
# Decrease the proportion of master-slave area (KP_1 = Num_1).
proportion_decrease = "Control-Shift-KP_1"
# Some commands above will affect all screens if this key is pressed in addition (Mod1 = Alt_L).
mod_screens = "Mod1"
# Some commands above will affect all workspaces if this key is pressed in addition (Mod4 = Super_L).
mod_workspaces = "Mod4"
################################################################################
[corners] # Action strings from [keys] section. #
################################################################################
# Corner at top left.
top_left = ""
# Corner at top center.
top_center = ""
# Corner at top right.
top_right = ""
# Corner at center right.
center_right = ""
# Corner at bottom right.
bottom_right = ""
# Corner at bottom center.
bottom_center = ""
# Corner at bottom left.
bottom_left = ""
# Corner at center left.
center_left = ""
################################################################################
[systray] # Action strings from [keys] section. #
################################################################################
# Icon left click with pointer.
click_left = ""
# Icon middle click with pointer.
click_middle = "toggle"
# Icon right click with pointer.
click_right = ""
# Icon vertical scroll up with pointer.
scroll_up = "cycle_previous"
# Icon vertical scroll down with pointer.
scroll_down = "cycle_next"
# Icon horizontal scroll left with pointer.
scroll_left = "proportion_decrease"
# Icon horizontal scroll right with pointer.
scroll_right = "proportion_increase"

View File

@ -0,0 +1,45 @@
# Flow colorscheme | Kitty
# https://github.com/0xstepit/flow.nvim
# Basic colors
background #1b2228
foreground #b3c1cc
selection_foreground #ff007b
selection_background #0d0d0d
# Normal colors
color0 #0d0d0d
color1 #f0757f
color2 #80f075
color3 #f0e675
color4 #75bdf0
color5 #a875f0
color6 #75f0e6
color7 #f2f2f2
# Bright colors
color8 #3d4f5c
color9 #f0757f
color10 #80f075
color11 #f0e675
color12 #75bdf0
color13 #a875f0
color14 #75f0e6
color15 #f2f2f2
# Url color
url_color #75bdf0
# Cursor
cursor #ff007b
cursor_text_color #0d0d0d
# Tabs
active_tab_background #75bdf0
active_tab_foreground #0d0d0d
inactive_tab_background #3d4f5c
inactive_tab_foreground #75bdf0
# Borders
active_border_color #757ff0
inactive_border_color #3d4f5c

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,35 @@
from kitty.key_encoding import KeyEvent, parse_shortcut
from kittens.tui.handler import result_handler
def main():
pass
def encode_key_mapping(window, key_mapping):
mods, key = parse_shortcut(key_mapping)
event = KeyEvent(
mods=mods,
key=key,
shift=bool(mods & 1),
alt=bool(mods & 2),
ctrl=bool(mods & 4),
super=bool(mods & 8),
hyper=bool(mods & 16),
meta=bool(mods & 32),
).as_window_system_event()
return window.encoded_key(event)
@result_handler(no_ui=True)
def handle_result(args, result, target_window_id, boss):
window = boss.window_id_map.get(target_window_id)
cmd = window.child.foreground_cmdline[0]
if cmd == 'tmux':
keymap = args[2]
encoded = encode_key_mapping(window, keymap)
window.write_to_child(encoded)
else:
boss.active_tab.neighboring_window(args[1])

View File

@ -0,0 +1,94 @@
# Based on MIT licensed code at https://github.com/chancez/dotfiles/blob/badc69d3895a6a942285amount26b8c372a55d77533eamount/kitty/.config/kitty/relative_resize.py
from kittens.tui.handler import result_handler
from kitty.key_encoding import KeyEvent, parse_shortcut
def encode_key_mapping(window, key_mapping):
mods, key = parse_shortcut(key_mapping)
event = KeyEvent(
mods=mods,
key=key,
shift=bool(mods & 1),
alt=bool(mods & 2),
ctrl=bool(mods & 4),
super=bool(mods & 8),
hyper=bool(mods & 16),
meta=bool(mods & 32),
).as_window_system_event()
return window.encoded_key(event)
def main(args):
pass
def relative_resize_window(direction, amount, target_window_id, boss):
window = boss.window_id_map.get(target_window_id)
if window is None:
return
neighbors = boss.active_tab.current_layout.neighbors_for_window(
window, boss.active_tab.windows
)
current_window_id = boss.active_tab.active_window
left_neighbors = neighbors.get('left')
right_neighbors = neighbors.get('right')
top_neighbors = neighbors.get('top')
bottom_neighbors = neighbors.get('bottom')
# has a neighbor on both sides
if direction == 'left' and (left_neighbors and right_neighbors):
boss.active_tab.resize_window('narrower', amount)
# only has left neighbor
elif direction == 'left' and left_neighbors:
boss.active_tab.resize_window('wider', amount)
# only has right neighbor
elif direction == 'left' and right_neighbors:
boss.active_tab.resize_window('narrower', amount)
# has a neighbor on both sides
elif direction == 'right' and (left_neighbors and right_neighbors):
boss.active_tab.resize_window('wider', amount)
# only has left neighbor
elif direction == 'right' and left_neighbors:
boss.active_tab.resize_window('narrower', amount)
# only has right neighbor
elif direction == 'right' and right_neighbors:
boss.active_tab.resize_window('wider', amount)
# has a neighbor above and below
elif direction == 'up' and (top_neighbors and bottom_neighbors):
boss.active_tab.resize_window('shorter', amount)
# only has top neighbor
elif direction == 'up' and top_neighbors:
boss.active_tab.resize_window('taller', amount)
# only has bottom neighbor
elif direction == 'up' and bottom_neighbors:
boss.active_tab.resize_window('shorter', amount)
# has a neighbor above and below
elif direction == 'down' and (top_neighbors and bottom_neighbors):
boss.active_tab.resize_window('taller', amount)
# only has top neighbor
elif direction == 'down' and top_neighbors:
boss.active_tab.resize_window('shorter', amount)
# only has bottom neighbor
elif direction == 'down' and bottom_neighbors:
boss.active_tab.resize_window('taller', amount)
@result_handler(no_ui=True)
def handle_result(args, result, target_window_id, boss):
direction = args[1]
amount = int(args[2])
window = boss.window_id_map.get(target_window_id)
cmd = window.child.foreground_cmdline[0]
if cmd == 'tmux':
keymap = args[3]
encoded = encode_key_mapping(window, keymap)
window.write_to_child(encoded)
else:
relative_resize_window(direction, amount, target_window_id, boss)

View File

@ -0,0 +1,49 @@
from kittens.tui.handler import result_handler
from kitty.key_encoding import KeyEvent, parse_shortcut
def main(args):
pass
def encode_key_mapping(window, key_mapping):
mods, key = parse_shortcut(key_mapping)
event = KeyEvent(
mods=mods,
key=key,
shift=bool(mods & 1),
alt=bool(mods & 2),
ctrl=bool(mods & 4),
super=bool(mods & 8),
hyper=bool(mods & 16),
meta=bool(mods & 32),
).as_window_system_event()
return window.encoded_key(event)
def split_window(boss, direction):
if direction == 'up' or direction == 'down':
boss.launch('--cwd=current', '--location=hsplit')
else:
boss.launch('--cwd=current', '--location=vsplit')
if direction == 'up' or direction == 'left':
boss.active_tab.move_window(direction)
@result_handler(no_ui=True)
def handle_result(args, result, target_window_id, boss):
window = boss.window_id_map.get(target_window_id)
if window is None:
return
direction = args[1]
cmd = window.child.foreground_cmdline[0]
if cmd == 'tmux':
keymap = args[2]
encoded = encode_key_mapping(window, keymap)
window.write_to_child(encoded)
else:
split_window(boss, direction)

View File

@ -0,0 +1,45 @@
# Flow colorscheme | Kitty
# https://github.com/0xstepit/flow.nvim
# Basic colors
background #1b2228
foreground #b3c1cc
selection_foreground #ff007b
selection_background #0d0d0d
# Normal colors
color0 #0d0d0d
color1 #f0757f
color2 #80f075
color3 #f0e675
color4 #75bdf0
color5 #a875f0
color6 #75f0e6
color7 #f2f2f2
# Bright colors
color8 #3d4f5c
color9 #f0757f
color10 #80f075
color11 #f0e675
color12 #75bdf0
color13 #a875f0
color14 #75f0e6
color15 #f2f2f2
# Url color
url_color #75bdf0
# Cursor
cursor #ff007b
cursor_text_color #0d0d0d
# Tabs
active_tab_background #75bdf0
active_tab_foreground #0d0d0d
inactive_tab_background #3d4f5c
inactive_tab_foreground #75bdf0
# Borders
active_border_color #757ff0
inactive_border_color #3d4f5c

View File

@ -0,0 +1,59 @@
package.path = package.path .. ";../?.lua;../flow/?.lua"
local util = require("util")
local M = {}
function M.generate(colors)
return util.interpolate(M.template, colors)
end
M.template = [=[
# Flow colorscheme | Kitty
# https://github.com/0xstepit/flow.nvim
# Basic colors
background ${bg}
foreground ${fg}
selection_foreground ${fluo}
selection_background ${black}
# Normal colors
color0 ${black}
color1 ${red}
color2 ${green}
color3 ${yellow}
color4 ${light_blue}
color5 ${purple}
color6 ${cyan}
color7 ${white}
# Bright colors
color8 ${fg_statusline}
color9 ${red}
color10 ${green}
color11 ${yellow}
color12 ${light_blue}
color13 ${purple}
color14 ${cyan}
color15 ${white}
# Url color
url_color ${light_blue}
# Cursor
cursor ${fluo}
cursor_text_color ${black}
# Tabs
active_tab_background ${light_blue}
active_tab_foreground ${black}
inactive_tab_background ${fg_statusline}
inactive_tab_foreground ${light_blue}
# Borders
active_border_color ${blue}
inactive_border_color ${fg_statusline}
]=]
return M

View File

@ -0,0 +1,59 @@
[mgr]
prepend_keymap = [
{on = "l", run = "plugin smart-enter", desc = "Enter the child directory, or open the file"},
{on = "p", run = "plugin smart-paste", desc = "Paste into the hovered directory or CWD"},
{on = "<ESC>", run = "close", desc = "Close current tab; exit if last tab"},
{on = "<ESC>", run = "close", desc = "Close input dialogue"},
{on = [ "u", "a" ], run = "plugin yamb --args=save", desc = "Add bookmark"},
{on = [ "u", "g" ], run = "plugin yamb --args=jump_by_key", desc = "Jump bookmark by key"},
{on = [ "u", "G" ], run = "plugin yamb --args=jump_by_fzf", desc = "Jump bookmark by fzf"},
{on = [ "u", "d" ], run = "plugin yamb --args=delete_by_key", desc = "Delete bookmark by key"},
{on = [ "u", "D" ], run = "plugin yamb --args=delete_by_fzf", desc = "Delete bookmark by fzf"},
{on = [ "u", "A" ], run = "plugin yamb --args=delete_all", desc = "DeLete all bookmarks"},
{on = [ "u", "r" ], run = "plugin yamb --args=rename_by_key", desc = "Rename bookmark by key"},
{on = [ "u", "R" ], run = "plugin yamb --args=rename_by_fzf", desc = "Rename bookmark by fzf"},
{on = [ "i" ], run = "plugin easyjump", desc = "easyjump"},
{on = [ "K" ], run = "arrow -6", desc = "Move cursor up 6 lines"},
{on = [ "J" ], run = "arrow 6", desc = "Move cursor down 6 lines"},
{on = [ "<Down>" ], run = "seek 2", desc = "Seek down 6 units in preview"},
{on = [ "<Up>" ], run = "seek -2", desc = "Seek up 6 units in preview"},
{ on = [ "B", "B" ], run = "plugin dual-pane --args=toggle", desc = "Dual-pane: toggle" },
{ on = "b", run = "plugin dual-pane --args=toggle_zoom", desc = "Dual-pane: toggle zoom" },
{ on = "<Tab>", run = "plugin dual-pane --args=next_pane", desc = "Dual-pane: switch to the other pane" },
{ on = "[", run = "plugin dual-pane --args='tab_switch -1 --relative'", desc = "Dual-pane: switch active to previous tab" },
{ on = "]", run = "plugin dual-pane --args='tab_switch 1 --relative'", desc = "Dual-pane: switch active to next tab" },
{ on = "1", run = "plugin dual-pane --args='tab_switch 0'", desc = "Switch to the first tab" },
{ on = "2", run = "plugin dual-pane --args='tab_switch 1'", desc = "Switch to the second tab" },
{ on = "3", run = "plugin dual-pane --args='tab_switch 2'", desc = "Switch to the third tab" },
{ on = "4", run = "plugin dual-pane --args='tab_switch 3'", desc = "Switch to the fourth tab" },
{ on = "5", run = "plugin dual-pane --args='tab_switch 4'", desc = "Switch to the fifth tab" },
{ on = "6", run = "plugin dual-pane --args='tab_switch 5'", desc = "Switch to the sixth tab" },
{ on = "7", run = "plugin dual-pane --args='tab_switch 6'", desc = "Switch to the seventh tab" },
{ on = "8", run = "plugin dual-pane --args='tab_switch 7'", desc = "Switch to the eighth tab" },
{ on = "9", run = "plugin dual-pane --args='tab_switch 8'", desc = "Switch to the ninth tab" },
{ on = "t", run = "plugin dual-pane --args='tab_create --current'", desc = "Dual-pane: create a new tab with CWD" },
{ on = "<F5>", run = "plugin dual-pane --args='copy_files --follow'", desc = "Dual-pane: copy selected files from active to inactive pane" },
{ on = "<F6>", run = "plugin dual-pane --args='move_files --follow'", desc = "Dual-pane: move selected files from active to inactive pane" },
{ on = [ "B", "s" ], run = "plugin dual-pane --args=save_config", desc = "Dual-pane: save current configuration" },
{ on = [ "B", "l" ], run = "plugin dual-pane --args=load_config", desc = "Dual-pane: load saved configuration" },
{ on = [ "B", "r" ], run = "plugin dual-pane --args=reset_config", desc = "Dual-pane: reset saved configuration" },
{ on = "<C-1>", run = "plugin toggle-view --args=parent", desc = "Toggle parent" },
{ on = "<C-2>", run = "plugin toggle-view --args=current", desc = "Toggle current" },
{ on = "<C-3>", run = "plugin toggle-view --args=preview", desc = "Toggle preview" },
{ on = [ "f", "g" ], run = "plugin fg", desc = "find file by content (fuzzy match)" },
{ on = [ "f", "G" ], run = "plugin fg --args='rg'", desc = "find file by content (ripgrep match)" },
{ on = [ "f", "f" ], run = "plugin fg --args='fzf'", desc = "find file by filename" },
{ on = [ "c", "m" ], run = "plugin chmod", desc = "Chmod on selected files" },
{ on = [ "F" ], run = "plugin smart-filter", desc = "Smart filter" },
# use `rip` to replace trash command
# { on = [ "d" ], run = [ "escape --visual", ''' shell --interactive 'rip "$@"' ''' ] },
{ on = [ "d" ], run = "plugin rip", desc = "rip file" },
]

View File

@ -0,0 +1,2 @@
[flavor]
use = "catppuccin-macchiato"

View File

@ -0,0 +1,43 @@
[mgr]
ratio = [3, 3, 7]
[preview]
ueberzug_offset = [22, 5, 0, 0]
[plugin]
prepend_preloaders = [
# Office Documents
{ mime = "application/vnd.openxmlformats-officedocument.*", run = "office" },
{ mime = "application/vnd.oasis.opendocument.*", run = "office" },
{ mime = "application/vnd.ms-*", run = "office" },
{ mime = "application/msword", run = "office" },
{ name = "*.docx", run = "office" },
{ name = "*.odt", run = "office" },
{ name = "*.ods", run = "office" },
]
prepend_previewers = [
# Office Documents
{ mime = "application/vnd.openxmlformats-officedocument.*", run = "office" },
{ mime = "application/vnd.oasis.opendocument.*", run = "office" },
{ mime = "application/vnd.ms-*", run = "office" },
{ mime = "application/msword", run = "office" },
{ name = "*.docx", run = "office" },
{ name = "*.odt", run = "office" },
{ name = "*.ods", run = "office" },
{ name = "*.md", run = 'piper -- CLICOLOR_FORCE=1 glow -w=$w -s=dark "$1"' },
{ name = "*/", run = 'piper -- eza -TL=3 --color=always --icons=always --group-directories-first --no-quotes "$1"' },
{ name = "*.tar*", run = 'piper --format=url -- tar tf "$1"' },
]
[[opener.noop]]
run = 'true'
desc = "No-op"
[[open.prepend_rules]]
mime = "inode/directory"
use = "noop"