From 7305e38da6d5910e1ff4b8372090990c114a5816 Mon Sep 17 00:00:00 2001 From: Ayush Dumasia Date: Sun, 13 Apr 2025 22:35:25 +0530 Subject: [PATCH] changes: hypr kitty zsh --- hypr/hyprland.conf | 2 +- kitty/kitty.conf | 18 ++---------- zsh/.zshrc | 68 ++++++++++++++++++++++++---------------------- 3 files changed, 40 insertions(+), 48 deletions(-) diff --git a/hypr/hyprland.conf b/hypr/hyprland.conf index b232e56..c4d0c8f 100644 --- a/hypr/hyprland.conf +++ b/hypr/hyprland.conf @@ -53,7 +53,7 @@ decoration { dim_special = 0.2 rounding = 6 -active_opacity = 0.95 +active_opacity = 1 inactive_opacity = 0.75 shadow { diff --git a/kitty/kitty.conf b/kitty/kitty.conf index 9262492..6889d02 100644 --- a/kitty/kitty.conf +++ b/kitty/kitty.conf @@ -1,27 +1,16 @@ -# Catppuccin-Mocha include current-theme.conf -window_padding_width 12 font_size 10.0 enable_ligature true confirm_os_window_close 0 -# font_family family="JetBrains Mono Nerd Font" -# bold_font auto -# italic_font auto -# bold_italic_font auto -# disable_ligatures always - map ctrl+shift+c copy_to_clipboard map ctrl+shift+v paste_from_clipboard - enable_audio_bell no - -window_padding_width 5 +window_padding_width 5 window_margin_width 5 -# window_border_width 2px active_border_color #e0e4e5 inactive_border_color #9EA3A7 enabled_layouts Tall, * @@ -33,16 +22,15 @@ enable_image_protocol yes background_opacity 0.95 - # BEGIN_KITTY_THEME # Catppuccin-Mocha # include current-theme.conf # END_KITTY_THEME - +open_url_modifiers ctrl+shift # BEGIN_KITTY_FONTS font_family family='JetBrainsMono Nerd Font Mono' postscript_name=JetBrainsMonoNFM-Regular bold_font auto italic_font auto bold_italic_font auto -# END_KITTY_FONTS \ No newline at end of file +# END_KITTY_FONTS diff --git a/zsh/.zshrc b/zsh/.zshrc index 5c4cd1d..fc1aed6 100755 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -4,8 +4,8 @@ export STARSHIP_CONFIG=~/.config/starship/starship.toml export EDITOR=/bin/nvim if [ ! -d "$ZINIT_HOME" ]; then - mkdir -p "$(dirname $ZINIT_HOME)" - git clone https://github.com/zdharma-continuum/zinit.git "$ZINIT_HOME" + mkdir -p "$(dirname $ZINIT_HOME)" + git clone https://github.com/zdharma-continuum/zinit.git "$ZINIT_HOME" fi source "${ZINIT_HOME}/zinit.zsh" @@ -43,16 +43,16 @@ bindkey '^n' history-search-forward bindkey '^[w' kill-region cd_up() { - cd .. - zle reset-prompt + cd .. + zle reset-prompt } zle -N cd_up bindkey '^H' cd_up cd_menu() { - local dir - dir=$(eza -1 --color=always --icons --group-directories-first | fzf --ansi --preview 'eza --tree --level=1 --icons --color=always {}') - [[ -n "$dir" ]] && cd "$dir" && zle reset-prompt + local dir + dir=$(eza -1 --color=always --icons --group-directories-first | fzf --ansi --preview 'eza --tree --level=1 --icons --color=always {}') + [[ -n "$dir" ]] && cd "$dir" && zle reset-prompt } zle -N cd_menu @@ -105,11 +105,15 @@ alias ....='cd ../..' alias ..='cd ..' alias ~='cd ~' +edit() { + vim ~/.config/$1 +} + cpcf() { local file - + file=$(fzf --query="$1" --preview 'bat --color=always {}' --preview-window 'right:60%' --bind 'ctrl-d:preview-page-down,ctrl-u:preview-page-up') - + if [ -n "$file" ]; then cat "$file" | wl-copy echo "Copied: $file" @@ -119,44 +123,44 @@ cpcf() { } gh_open() { - xdg-open "https://github.com/ad1822/$1" + xdg-open "https://github.com/ad1822/$1" } backup_dots(){ - exec syncAll.sh + exec syncAll.sh } fcd(){ - local dir - dir=$(find ${1:-.} -type d -not -path '*/\.*' 2> /dev/null | fzf +m) && cd "$dir" + local dir + dir=$(find ${1:-.} -type d -not -path '*/\.*' 2> /dev/null | fzf +m) && cd "$dir" } extract() { - if [ -f "$1" ]; then - case "$1" in - *.tar.gz) tar -xzf "$1" ;; - *.tar.xz) tar -xf "$1" ;; - *.tar.bz2) tar -xjf "$1" ;; - *.gz) gunzip "$1" ;; - *.bz2) bunzip2 "$1" ;; - *.zip) unzip "$1" ;; - *.Z) uncompress "$1" ;; - *.7z) 7z x "$1" ;; - *) echo "'$1' cannot be extracted" ;; - esac - else - echo "'$1' is not a valid file" - fi + if [ -f "$1" ]; then + case "$1" in + *.tar.gz) tar -xzf "$1" ;; + *.tar.xz) tar -xf "$1" ;; + *.tar.bz2) tar -xjf "$1" ;; + *.gz) gunzip "$1" ;; + *.bz2) bunzip2 "$1" ;; + *.zip) unzip "$1" ;; + *.Z) uncompress "$1" ;; + *.7z) 7z x "$1" ;; + *) echo "'$1' cannot be extracted" ;; + esac + else + echo "'$1' is not a valid file" + fi } killp() { - ps aux | fzf | awk '{print $2}' | xargs kill -9 + ps aux | fzf | awk '{print $2}' | xargs kill -9 } j() { - local dir - dir=$(eza -1 --color=always --icons --group-directories-first | fzf --ansi) && cd "$(echo "$dir" | awk '{print $NF}')" + local dir + dir=$(eza -1 --color=always --icons --group-directories-first | fzf --ansi) && cd "$(echo "$dir" | awk '{print $NF}')" } @@ -165,7 +169,7 @@ take() { } c() { - cd "$1" && ls + cd "$1" && ls } autoload -U +X bashcompinit && bashcompinit