diff --git a/home/.zshrc b/home/.zshrc index d4a909f..c64abb5 100644 --- a/home/.zshrc +++ b/home/.zshrc @@ -1,15 +1,50 @@ +# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. +# Initialization code that may require console input (password prompts, [y/n] +# confirmations, etc.) must go above this block; everything else may go below. +if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then + source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" +fi + + + +# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. +[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh + + export LANG=de_DE.UTF-8 export EDITOR="nvim" export SUDO_EDITOR="nvim" +export MOZ_ENABLE_WAYLAND=1 + +# set PATH so it includes user's private ~/.local/bin if it exists +if [ -d "$HOME/.local/bin" ] ; then + PATH="$HOME/.local/bin:$PATH" +fi HISTFILE=~/.histfile HISTSIZE=1000 SAVEHIST=1000 -alias ssh="kitty +kitten ssh" -alias l="lsd -lh --group-dirs first --size short" +TERM_ID=(ps -o 'ppid=' -p $$) +TERM_NAME=(ps -o 'cmd=' -p $TERM_ID) +if [[ "$TERM_NAME" = "kitty" ]]; then + alias ssh="kitty +kitten ssh" +else + alias ssh="TERM=xterm-256color ssh" +fi +alias l="lsd -l --group-dirs first --size short --config-file ~/.config/lsd/config.yaml" alias ls="lsd" alias orphans='[[ -n $(pacman -Qdt) ]] && sudo pacman -Rs $(pacman -Qdtq) || echo "no orphans to remove"' +#alias web="" + +web() { + xdg-open "https://search.moonarch.de/search?q=$@" +} + +f() { + fff "$@" + cd "$(cat "${XDG_CACHE_HOME:=${HOME}/.cache}/fff/.fff_d")" +} bindkey "^[[3~" delete-char bindkey "^[[H" beginning-of-line @@ -17,19 +52,43 @@ bindkey "^[[F" end-of-line bindkey "^[[1;5C" forward-word bindkey "^[[1;5D" backward-word -source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh -autoload -Uz compinit vcs_info promptinit -compinit -promptinit -# This will set the default prompt to the walters theme -prompt adam2 -# git info -precmd_vcs_info() { vcs_info } -precmd_functions+=( precmd_vcs_info ) -setopt prompt_subst -RPROMPT='${vcs_info_msg_0_}' -# PROMPT='${vcs_info_msg_0_}%# ' -zstyle ':vcs_info:git:*' formats '%b' \ No newline at end of file +plugins=(zsh-interactive-cd git aliases docker archlinux sudo vscode) + + + +# autoload -Uz compinit vcs_info promptinit colors && colors +# compinit +# promptinit + +# # This will set the default prompt theme +# prompt redhat + +# # git info +# precmd_vcs_info() { vcs_info } +# precmd_functions+=( precmd_vcs_info ) +# setopt prompt_subst +# RPROMPT='${vcs_info_msg_0_}' +# # PROMPT='${vcs_info_msg_0_}%# ' +# zstyle ':vcs_info:git:*' formats '%b' + +# PS1="%{$fg[red]%}%n%{$reset_color%}@%{$fg[blue]%}%m %{$fg[yellow]%}%(5~|%-1~/.../%3~|%4~) %{$reset_color%}%% " + +export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm +[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion + + + + + + + +source /usr/share/oh-my-zsh/oh-my-zsh.sh +source $HOME/.oh-my-zsh/custom/themes/powerlevel10k/powerlevel10k.zsh-theme +source $HOME/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh +source $HOME/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh + +eval "$(fzf --zsh)" diff --git a/setup.sh b/setup.sh index fe84e0e..03f9599 100755 --- a/setup.sh +++ b/setup.sh @@ -97,10 +97,10 @@ function inst_zsh { sudo install -C $MONARCHOS_DIR/home/.zshrc $HOME/.zshrc rm -rf ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions - git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting rm -rf ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting - git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k + git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting rm -rf ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k + git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k chsh -s /usr/bin/zsh fi } @@ -115,7 +115,7 @@ function inst_basic_pkgs { if [[ $confirm_basics == "Y" ]]; then - declare -a pkg_list=(jq dunst network-manager-applet alarm-clock-applet man-db hardinfo networkmanager-openvpn udisks2 plocate vim alacritty gettext-hostname neovim lsd alsa-utils ponymix btop powertop polkit lxsession timeshift timeshift-autosnap pcmanfm librewolf-bin) + declare -a pkg_list=(jq network-manager-applet alarm-clock-applet man-db hardinfo networkmanager-openvpn udisks2 plocate vim alacritty gettext-hostname neovim lsd alsa-utils ponymix btop powertop polkit lxsession timeshift timeshift-autosnap pcmanfm librewolf-bin fzf) for key in "${pkg_list[@]}" do @@ -286,7 +286,7 @@ function set_gui { read confirm_gui if [[ $confirm_gui == "Y" ]]; then - declare -a pkg_list=(celluloid playerctl audacious font-manager viewnior tumbler ffmpegthumbnailer pavucontrol viewnior ttf-hack-nerd ttf-joypixels sweet-cursor-theme-git catppuccin-gtk-theme-mocha flatery-icon-theme-git) + declare -a pkg_list=(celluloid playerctl audacious font-manager viewnior tumbler ffmpegthumbnailer pavucontrol ttf-hack-nerd ttf-joypixels sweet-cursor-theme-git catppuccin-gtk-theme-mocha flatery-icon-theme-git) for key in "${pkg_list[@]}" do pkg_inst $key @@ -304,7 +304,7 @@ function set_gui { gsettings set org.gnome.desktop.interface gtk-theme "Catppuccin-Mocha-Standard-Lavender-Dark" gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark' gsettings set org.gnome.desktop.interface cursor-theme Sweet-cursors - gsettings set org.cinnamon.desktop.default-applications.terminal exec alacritty + #gsettings set org.cinnamon.desktop.default-applications.terminal exec alacritty sudo mkdir -p /usr/local/share/fonts/ sudo install -C $MONARCHOS_DIR/usr/local/share/fonts/MonarchOS.ttf /usr/local/share/fonts/MonarchOS.ttf @@ -386,7 +386,7 @@ function inst_hypr { read confirm_hypr if [[ $confirm_hypr == "Y" ]]; then - declare -a pkg_list=(wayland xorg-xwayland hyprland-git hypridle hyprlock hyprcursor-git hyprkeys hyprpicker swww waypaper-git xdg-desktop-portal-hyprland wdisplays waybar nwg-look cliphist wlogout swayosd-git hyprlock) + declare -a pkg_list=(wayland hyprland hypridle hyprlock hyprcursor hyprkeys hyprpicker swww waypaper xdg-desktop-portal-hyprland wdisplays waybar nwg-look cliphist wlogout swayosd hyprlock waybar-module-pacman-updates) for key in "${pkg_list[@]}" do pkg_inst $key