minor fix

This commit is contained in:
js0ny 2025-02-23 19:52:23 +00:00
parent bf26d5ed56
commit 48a93e2998
21 changed files with 515 additions and 2785 deletions

View file

@ -0,0 +1,85 @@
# vim:ft=kitty
# Customized
background_opacity 0.75
background_blur 1
## name: Catppuccin-Mocha
## author: Pocco81 (https://github.com/Pocco81)
## license: MIT
## upstream: https://github.com/catppuccin/kitty/blob/main/mocha.conf
## blurb: Soothing pastel theme for the high-spirited!
# The basic colors
foreground #CDD6F4
background #1E1E2E
selection_foreground #1E1E2E
selection_background #F5E0DC
# Cursor colors
cursor #F5E0DC
cursor_text_color #1E1E2E
# URL underline color when hovering with mouse
url_color #F5E0DC
# Kitty window border colors
active_border_color #B4BEFE
inactive_border_color #6C7086
bell_border_color #F9E2AF
# OS Window titlebar colors
wayland_titlebar_color system
macos_titlebar_color system
# Tab bar colors
active_tab_foreground #11111B
active_tab_background #CBA6F7
inactive_tab_foreground #CDD6F4
inactive_tab_background #181825
tab_bar_background #11111B
# Colors for marks (marked text in the terminal)
mark1_foreground #1E1E2E
mark1_background #B4BEFE
mark2_foreground #1E1E2E
mark2_background #CBA6F7
mark3_foreground #1E1E2E
mark3_background #74C7EC
# The 16 terminal colors
# black
color0 #45475A
color8 #585B70
# red
color1 #F38BA8
color9 #F38BA8
# green
color2 #A6E3A1
color10 #A6E3A1
# yellow
color3 #F9E2AF
color11 #F9E2AF
# blue
color4 #89B4FA
color12 #89B4FA
# magenta
color5 #F5C2E7
color13 #F5C2E7
# cyan
color6 #94E2D5
color14 #94E2D5
# white
color7 #BAC2DE
color15 #A6ADC8

View file

@ -0,0 +1,80 @@
# vim:ft=kitty
## name: Catppuccin-Mocha
## author: Pocco81 (https://github.com/Pocco81)
## license: MIT
## upstream: https://github.com/catppuccin/kitty/blob/main/mocha.conf
## blurb: Soothing pastel theme for the high-spirited!
# The basic colors
foreground #CDD6F4
background #1E1E2E
selection_foreground #1E1E2E
selection_background #F5E0DC
# Cursor colors
cursor #F5E0DC
cursor_text_color #1E1E2E
# URL underline color when hovering with mouse
url_color #F5E0DC
# Kitty window border colors
active_border_color #B4BEFE
inactive_border_color #6C7086
bell_border_color #F9E2AF
# OS Window titlebar colors
wayland_titlebar_color system
macos_titlebar_color system
# Tab bar colors
active_tab_foreground #11111B
active_tab_background #CBA6F7
inactive_tab_foreground #CDD6F4
inactive_tab_background #181825
tab_bar_background #11111B
# Colors for marks (marked text in the terminal)
mark1_foreground #1E1E2E
mark1_background #B4BEFE
mark2_foreground #1E1E2E
mark2_background #CBA6F7
mark3_foreground #1E1E2E
mark3_background #74C7EC
# The 16 terminal colors
# black
color0 #45475A
color8 #585B70
# red
color1 #F38BA8
color9 #F38BA8
# green
color2 #A6E3A1
color10 #A6E3A1
# yellow
color3 #F9E2AF
color11 #F9E2AF
# blue
color4 #89B4FA
color12 #89B4FA
# magenta
color5 #F5C2E7
color13 #F5C2E7
# cyan
color6 #94E2D5
color14 #94E2D5
# white
color7 #BAC2DE
color15 #A6ADC8

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,80 @@
# vim:ft=kitty
## name: Catppuccin-Latte
## author: Pocco81 (https://github.com/Pocco81)
## license: MIT
## upstream: https://github.com/catppuccin/kitty/blob/main/latte.conf
## blurb: Soothing pastel theme for the high-spirited!
# The basic colors
foreground #4C4F69
background #EFF1F5
selection_foreground #EFF1F5
selection_background #DC8A78
# Cursor colors
cursor #DC8A78
cursor_text_color #EFF1F5
# URL underline color when hovering with mouse
url_color #DC8A78
# Kitty window border colors
active_border_color #7287FD
inactive_border_color #9CA0B0
bell_border_color #DF8E1D
# OS Window titlebar colors
wayland_titlebar_color system
macos_titlebar_color system
# Tab bar colors
active_tab_foreground #EFF1F5
active_tab_background #8839EF
inactive_tab_foreground #4C4F69
inactive_tab_background #9CA0B0
tab_bar_background #BCC0CC
# Colors for marks (marked text in the terminal)
mark1_foreground #EFF1F5
mark1_background #7287fD
mark2_foreground #EFF1F5
mark2_background #8839EF
mark3_foreground #EFF1F5
mark3_background #209FB5
# The 16 terminal colors
# black
color0 #5C5F77
color8 #6C6F85
# red
color1 #D20F39
color9 #D20F39
# green
color2 #40A02B
color10 #40A02B
# yellow
color3 #DF8E1D
color11 #DF8E1D
# blue
color4 #1E66F5
color12 #1E66F5
# magenta
color5 #EA76CB
color13 #EA76CB
# cyan
color6 #179299
color14 #179299
# white
color7 #ACB0BE
color15 #BCC0CC

103
tools/kitty/window.py Normal file
View file

@ -0,0 +1,103 @@
# https://github.com/sxyazi/dotfiles
from kittens.tui.handler import result_handler
directions = {
"top": "u",
"bottom": "e",
"left": "n",
"right": "i",
}
def main(args):
pass
@result_handler(no_ui=True)
def handle_result(args, answer, target_window_id, boss):
window = boss.active_window
if window is None:
return
cmd = window.child.foreground_cmdline[0]
act = args[1] # e.g. -jump
if act[0] == "-" and cmd[-4:] == "nvim":
second = directions[args[2]] if len(args) > 2 else ""
window.write_to_child(f"\x1b[119;8u{act[1]}{second}")
return
if (act == "-close" or act == "-quit") and cmd[-7:] == "joshuto":
window.write_to_child(f"\x1b{act[1]}")
return
def split(direction):
if direction == "top" or direction == "bottom":
boss.launch("--cwd=current", "--location=hsplit")
else:
boss.launch("--cwd=current", "--location=vsplit")
if direction == "top" or direction == "left":
boss.active_tab.move_window(direction)
def close():
boss.close_window()
def quit():
boss.quit()
def jump(direction):
boss.active_tab.neighboring_window(direction)
# https://github.com/chancez/dotfiles/blob/master/kitty/.config/kitty/relative_resize.py
def resize(direction):
neighbors = boss.active_tab.current_layout.neighbors_for_window(
window, boss.active_tab.windows
)
top, bottom = neighbors.get("top"), neighbors.get("bottom")
left, right = neighbors.get("left"), neighbors.get("right")
if direction == "top":
if top and bottom:
boss.active_tab.resize_window("shorter", 10)
elif top:
boss.active_tab.resize_window("taller", 10)
elif bottom:
boss.active_tab.resize_window("shorter", 10)
elif direction == "bottom":
if top and bottom:
boss.active_tab.resize_window("taller", 10)
elif top:
boss.active_tab.resize_window("shorter", 10)
elif bottom:
boss.active_tab.resize_window("taller", 10)
elif direction == "left":
if left and right:
boss.active_tab.resize_window("narrower", 10)
elif left:
boss.active_tab.resize_window("wider", 10)
elif right:
boss.active_tab.resize_window("narrower", 10)
elif direction == "right":
if left and right:
boss.active_tab.resize_window("wider", 10)
elif left:
boss.active_tab.resize_window("narrower", 10)
elif right:
boss.active_tab.resize_window("wider", 10)
def move(direction):
boss.active_tab.move_window(direction)
act = act[1:]
if act == "split":
split(args[2])
elif act == "close":
close()
elif act == "quit":
quit()
elif act == "jump":
jump(args[2])
elif act == "resize":
resize(args[2])
elif act == "move":
move(args[2])