mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 08:43:00 +00:00
breaking: Remove setup script and use chezmoi
This commit is contained in:
parent
02bbb24cac
commit
0051a163c3
190 changed files with 118 additions and 3456 deletions
81
dot_config/kitty/dark-theme.auto.conf
Normal file
81
dot_config/kitty/dark-theme.auto.conf
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
# 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!
|
||||
|
||||
# Accent: Lavender #B4BEFE
|
||||
|
||||
|
||||
# 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 #B4BEFE
|
||||
inactive_tab_foreground #CDD6F4
|
||||
inactive_tab_background #1E1E2E
|
||||
tab_bar_background #181825
|
||||
|
||||
# Colors for marks (marked text in the terminal)
|
||||
mark1_foreground #1E1E2E
|
||||
mark1_background #B4BEFE
|
||||
mark2_foreground #1E1E2E
|
||||
mark2_background #B4BEFE
|
||||
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
|
||||
82
dot_config/kitty/kitty.conf
Normal file
82
dot_config/kitty/kitty.conf
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
# vim:fileencoding=utf-8:foldmethod=marker
|
||||
|
||||
# Fonts {{{
|
||||
|
||||
# Family
|
||||
font_family family="Maple Mono NF CN"
|
||||
bold_font auto
|
||||
italic_font auto
|
||||
bold_italic_font auto
|
||||
|
||||
# Ligature
|
||||
disable_ligatures never
|
||||
font_size 12.0
|
||||
# }}}
|
||||
|
||||
# Text Cursor {{{
|
||||
# Cursor Trail
|
||||
cursor_trail 1
|
||||
cursor_trail_decay 0.1 0.4
|
||||
cursor_trail_start_threshold 2
|
||||
# }}}
|
||||
|
||||
# Tab Bar {{{
|
||||
tab_bar_edge top
|
||||
tab_bar_align left
|
||||
tab_bar_style powerline
|
||||
# Hide tab bar when there is only one tab
|
||||
tab_bar_min_tabs 2
|
||||
tab_title_template "{f'{title[:30]}…' if title.rindex(title[-1]) + 1 > 30 else (title.center(6) if (title.rindex(title[-1]) + 1) % 2 == 0 else title.center(5))}"
|
||||
active_tab_font_style bold
|
||||
# }}}
|
||||
|
||||
# Color Scheme {{{
|
||||
# BEGIN_KITTY_THEME
|
||||
# Rosé Pine Dawn
|
||||
include current-theme.conf
|
||||
# END_KITTY_THEME
|
||||
# }}}
|
||||
|
||||
|
||||
# macOS {{{
|
||||
macos_option_as_alt yes
|
||||
macos_quit_when_last_window_closed yes
|
||||
# }}}
|
||||
|
||||
# Keyboard Shortcuts {{{
|
||||
map alt+t new_tab
|
||||
map alt+w close_tab
|
||||
map ctrl+c copy_and_clear_or_interrupt
|
||||
map alt+1 goto_tab 1
|
||||
map alt+2 goto_tab 2
|
||||
map alt+3 goto_tab 3
|
||||
map alt+4 goto_tab 4
|
||||
map alt+5 goto_tab 5
|
||||
map alt+6 goto_tab 6
|
||||
map alt+7 goto_tab 7
|
||||
map alt+8 goto_tab 8
|
||||
map alt+9 goto_tab -1
|
||||
# Leader: ctrl+q
|
||||
# https://github.com/sxyazi/dotfiles
|
||||
map ctrl+q noop
|
||||
map ctrl+q>| kitten window.py +split right
|
||||
map ctrl+q>\ kitten window.py +split right
|
||||
map ctrl+q>- kitten window.py +split bottom
|
||||
map ctrl+q>h kitten window.py -jump left
|
||||
map ctrl+q>n kitten window.py -jump bottom
|
||||
map ctrl+q>e kitten window.py -jump top
|
||||
map ctrl+q>i kitten window.py -jump right
|
||||
map alt+shift+h kitten window.py -jump left
|
||||
map alt+shift+n kitten window.py -jump bottom
|
||||
map alt+shift+e kitten window.py -jump top
|
||||
map alt+shift+i kitten window.py -jump right
|
||||
map ctrl+q>shift+H kitten window.py -resize left
|
||||
map ctrl+q>shift+N kitten window.py -resize bottom
|
||||
map ctrl+q>shift+E kitten window.py -resize top
|
||||
map ctrl+q>shift+I kitten window.py -resize right
|
||||
map cmd+enter toggle_layout stack
|
||||
map ctrl+shift+enter toggle_layout stack
|
||||
# }}}
|
||||
|
||||
|
||||
shell fish
|
||||
80
dot_config/kitty/light-theme.auto.conf
Normal file
80
dot_config/kitty/light-theme.auto.conf
Normal 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
dot_config/kitty/window.py
Normal file
103
dot_config/kitty/window.py
Normal 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])
|
||||
Loading…
Add table
Add a link
Reference in a new issue