Skip to content

Commit

Permalink
Improve kitty conf, note down key mappings for TUI
Browse files Browse the repository at this point in the history
  • Loading branch information
utensil committed Oct 29, 2024
1 parent 9c37cdd commit fec1bef
Show file tree
Hide file tree
Showing 4 changed files with 107 additions and 5 deletions.
14 changes: 11 additions & 3 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,11 @@ prep-alacritty:
# https://alacritty.org/config-alacritty.html
cp .alacritty.toml ~/.alacritty.toml
prep-kitty:
prep-kitty: && sync-kitty
#!/usr/bin/env bash
which kitty || brew install --cask kitty
@sync-kitty:
# configure kitty
# https://sw.kovidgoyal.net/kitty/conf.html
mkdir -p ~/.config/kitty
Expand All @@ -120,7 +122,7 @@ sync-nvim: stylua
mkdir -p ~/.config/nvim
cp -f init.lua ~/.config/nvim/init.lua
sync-lvim: stylua sync-nvim
sync-lvim: stylua sync-nvim sync-kitty
mkdir -p ~/.config/lvim
cp -f init.lua ~/.config/lvim/nvim-init.lua
cp -f uts-plugins.lua ~/.config/lvim/uts-plugins.lua
Expand Down Expand Up @@ -212,7 +214,13 @@ config-sbar:
sbar:
brew services restart felixkratz/formulae/sketchybar

prep-tile:
prep-tile: prep-amethyst

prep-yabai:
brew install koekeishiya/formulae/yabai
yabai --start-service

prep-amethyst:
brew install --cask amethyst

# act:
Expand Down
37 changes: 36 additions & 1 deletion kitty.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ placement_strategy center

macos_quit_when_last_window_closed yes

map cmd+n new_os_window_with_cwd
# map cmd+n new_os_window_with_cwd

# BEGIN_KITTY_THEME
# GitHub Dark
Expand All @@ -21,3 +21,38 @@ macos_titlebar_color dark

startup_session kitty_session.conf

# Inspired by https://github.com/FelixKratz/dotfiles/blob/master/.config/kitty/kitty.conf

hide_window_decorations titlebar-only
window_margin_width 4
cursor_blink_interval 0
# macos_quit_when_last_window_closed no
macos_colorspace default
macos_show_window_title_in window
repaint_delay 8
input_delay 1
resize_draw_strategy blank
remember_window_size no
resize_debounce_time 0.001
# confirm_os_window_close -2

tab_bar_edge top
tab_bar_style powerline
tab_powerline_style slanted
tab_activity_symbol 
tab_title_max_length 30
tab_title_template "{fmt.fg.red}{bell_symbol}{fmt.fg.tab} {index}: ({tab.active_oldest_exe}) {title} {activity_symbol}"
map cmd+1 goto_tab 1
map cmd+2 goto_tab 2
map cmd+3 goto_tab 3
map cmd+4 goto_tab 4
map cmd+5 goto_tab 5
map cmd+6 goto_tab 6
map cmd+7 goto_tab 7
map cmd+8 goto_tab 8
map cmd+9 goto_tab 9
map cmd+0 goto_tab 10

map cmd+t launch --type=tab --cwd=current
map cmd+n launch --type=os-window --cwd=current

4 changes: 3 additions & 1 deletion trees/uts-002F.tree
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
\tag{notes}
\tag{draft}

\note{some useful keys in Neovim}{
\note{some useful key mappings in Neovim}{

\mdblock{Introduction}{
Here are some useful keys that I like using in NeoVim, some of them require corresponding plugins.
Expand Down Expand Up @@ -293,6 +293,8 @@ It's very important to stay in the flow and Zen mode as much as possible. Split

\mdblock{Further reading}{

See also [[uts-002G]] for related TUI key mappings.

See [Vim cheatsheet](https://devhints.io/vim) for key mappings that apply to vanilla Vim.

See [VSCode Vim ROADMAP](https://github.com/VSCodeVim/Vim/blob/HEAD/ROADMAP.md) for key mappings that apply to (limited) VSCode Vim mode, but now I have switch to use the real NeoVim.
Expand Down
57 changes: 57 additions & 0 deletions trees/uts-002G.tree
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
\import{macros}
% clifford hopf spin tt ag math draft tech exp notes
\tag{tech}
\tag{notes}
\tag{draft}

\note{useful key mappings for TUI}{
\mdblock{Top bar}{
Setup:

- Use [SketchyBar](https://github.com/FelixKratz/SketchyBar)
- Use `just prep-sbar` to setup SketchyBar
- Modify `~/.config/sketchybar/bar.lua as follows:

```lua
display = "all",
sticky = true,
```

for better multi-monitor support, and make the bar sticky.

Unfortunatly, SketchyBar actively hides itself for fullscreen spaces, see [this issue](https://github.com/FelixKratz/SketchyBar/issues/594) for more info.

So, remember to use `Cmd + Ctrl + F` to toggle fullscreen mode.
}

\mdblock{Window tiling}{
Setup:

- Use [Amethyst](https://github.com/ianyh/Amethyst)
- sensible default
- less confusing configuration than [yabai](https://github.com/koekeishiya/yabai) it seems
- Use `just prep-tile` to install Amethyst

Keys:

- `Option + Shift + Space` to cycle through layouts, prefer Tall
- `Option + Shift + J/K` to cycle through windows
- `Option + Shift + H/L` to resize windows
}

\mdblock{Terminal}{
Setup:

- Use [Kitty](https://sw.kovidgoyal.net/kitty/)
- Use `just prep-kitty` to install Kitty

Keys:

- `Cmd + N` to open a new OS window with the same current directory
- `Cmd + T` to open a new tab with the same current directory
- `Cmd + number` to switch to tab number
- `Cmd + w` to close the current tab
- `Cmd + q` to quit kitty

}
}

0 comments on commit fec1bef

Please sign in to comment.