diff --git a/.config/ghostty/config b/.config/ghostty/config index 0cd285e..79ee65e 100644 --- a/.config/ghostty/config +++ b/.config/ghostty/config @@ -1,47 +1,4 @@ -# This is the configuration file for Ghostty. -# -# This template file has been automatically created at the following -# path since Ghostty couldn't find any existing config files on your system: -# -# /home/daniele/.config/ghostty/config -# -# The template does not set any default options, since Ghostty ships -# with sensible defaults for all options. Users should only need to set -# options that they want to change from the default. -# -# Run `ghostty +show-config --default --docs` to view a list of -# all available config options and their default values. -# -# Additionally, each config option is also explained in detail -# on Ghostty's website, at https://ghostty.org/docs/config. - -# Config syntax crash course -# ========================== -# # The config file consists of simple key-value pairs, -# # separated by equals signs. -# font-family = Iosevka -# window-padding-x = 2 -# -# # Spacing around the equals sign does not matter. -# # All of these are identical: -# key=value -# key= value -# key =value -# key = value -# -# # Any line beginning with a # is a comment. It's not possible to put -# # a comment after a config option, since it would be interpreted as a -# # part of the value. For example, this will have a value of "#123abc": -# background = #123abc -# -# # Empty values are used to reset config keys to default. -# key = -# -# # Some config options have unique syntaxes for their value, -# # which is explained in the docs for that config option. -# # Just for example: -# resize-overlay-duration = 4s 200ms -keybind = ctrl+enter=unbind +gtk-tabs-location = "hidden" confirm-close-surface = false theme = Builtin Pastel Dark background-opacity = 0.8 @@ -49,3 +6,36 @@ resize-overlay = never cursor-color = #ffffff cursor-invert-fg-bg = true adjust-cursor-thickness = 1 +unfocused-split-fill = 373732 +window-inherit-working-directory = true + +# Vim keybindings +keybind = ctrl+enter=unbind +keybind = performable:ctrl+h=goto_split:left +keybind = performable:ctrl+j=goto_split:down +keybind = performable:ctrl+k=goto_split:up +keybind = performable:ctrl+l=goto_split:right + +# Resize splits +keybind = ctrl+shift+h=resize_split:left,10 +keybind = ctrl+shift+j=resize_split:down,10 +keybind = ctrl+shift+k=resize_split:up,10 +keybind = ctrl+shift+l=resize_split:right,10 + +# Split keybindings +keybind = ctrl+-=new_split:down +keybind = ctrl+\=new_split:right + +keybind = ctrl+7=goto_tab:1 +keybind = ctrl+8=goto_tab:2 +keybind = ctrl+9=goto_tab:3 +keybind = ctrl+0=goto_tab:4 + +keybind = ctrl+space=new_tab +keybind = ctrl+m=toggle_split_zoom +keybind = ctrl+,=previous_tab +keybind = ctrl+.=next_tab + +keybind = ctrl+shift+minus=decrease_font_size:1 +keybind = ctrl+shift+plus=increase_font_size:1 +keybind = ctrl+shift+0=reset_font_size diff --git a/.config/zsh/conf.d/04_binds.zsh b/.config/zsh/conf.d/04_binds.zsh index aa87077..3765532 100644 --- a/.config/zsh/conf.d/04_binds.zsh +++ b/.config/zsh/conf.d/04_binds.zsh @@ -20,6 +20,6 @@ bindkey -v '^R' history-incremental-search-backward # Set up fzf key bindings and fuzzy completion eval "$(fzf --zsh)" -# tmux-sessionizer -bindkey -s ^n "tmux-sessionizer\n" +# project-navigator +bindkey -s ^n "project-navigator\n" diff --git a/.config/zsh/functions/project-navigator.zsh b/.config/zsh/functions/project-navigator.zsh new file mode 100644 index 0000000..332cbc9 --- /dev/null +++ b/.config/zsh/functions/project-navigator.zsh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +project-navigator() { + if [[ $# -eq 1 ]]; then + selected=$1 + else + selected=$(find ~/Documents ~/Documents/projects ~/ -mindepth 1 -maxdepth 1 -type d | fzf) + fi + + if [[ -z $selected ]]; then + return -1 + fi + + selected_name=$(basename "$selected" | tr . _) + cd "$selected" || return -1 +} + diff --git a/.zshenv b/.zshenv new file mode 100644 index 0000000..aed27b6 --- /dev/null +++ b/.zshenv @@ -0,0 +1 @@ +export ZDOTDIR=~/.config/zsh