From 69ac6898d15aaf7781c3eafd1eee6df847b789db Mon Sep 17 00:00:00 2001 From: Tu Puta Madre Date: Thu, 25 Jun 2026 12:00:46 -0600 Subject: [PATCH] 226FP.50053-Blossom --- ale.sh | 36 ++++++++++++++++++++++ b.sh | 80 ------------------------------------------------ bashrc | 7 +++++ config/kak/kakrc | 14 +++++++++ ssh/config | 46 ++++++++++++++++++++++++++++ zshrc | 1 + 6 files changed, 104 insertions(+), 80 deletions(-) create mode 100755 ale.sh delete mode 100644 b.sh create mode 100644 bashrc create mode 100644 config/kak/kakrc create mode 100644 ssh/config diff --git a/ale.sh b/ale.sh new file mode 100755 index 0000000..0cb299b --- /dev/null +++ b/ale.sh @@ -0,0 +1,36 @@ +#!/bin/sh + +# Verifica que se ejecute en directorio correcto +if [ "$PWD" != "/git/dotAle" ]; then + echo "ERROR: Debes ubicarte en /git/dotAle para ejecutar el script.\n\t... te encuentras en\t $PWD" + exit 2 +fi + +# Comprobar init +isVoid=false +if ! command -v systemctl &> /dev/null; then + isVoid=true +fi + +# Main +if [ $isVoid ]; then + ln -sf /git/dotAle/zshrc ~/.zshrc + mkdir -p /home/ale/.config + mkdir -p /home/ale/.cache/zsh + touch /home/ale/.cache/zsh/hist + for dir in /git/dotAle/config/*; do + if [ -d /home/ale/.config/${dir##*/} ]; then + rm -rf /home/ale/.config/${dir##*/} + fi + ln -sf /git/dotAle/config/${dir##*/} /home/ale/.config/ + done + mkdir -p ~/.ssh + ln -sf /git/dotAle/ssh/* ~/.ssh/ +else + ln -sf /git/dotAle/bashrc ~/.bashrc + mkdir -p ~/.config + cp -r /git/dotAle/config/* ~/.config/ + rm -rf ~/.config/zsh + mkdir -p ~/.ssh + ln -sf /git/dotAle/ssh/* ~/.ssh/ +fi diff --git a/b.sh b/b.sh deleted file mode 100644 index 42e1a8f..0000000 --- a/b.sh +++ /dev/null @@ -1,80 +0,0 @@ -#!/bin/bash - -# Verifica que se ejecute como ROOT -if [ "$EUID" -ne 0 ]; then - echo "ERROR: Se debe ejecutar como ROOT.\n\tdeberías ejecutar sudo ./b.sh" - exit -elif [ "$PWD" != "/git/dotAle" ]; then - echo "ERROR: Debes ubicarte en /git/dotAle para ejecutar el script.\n\tahora te encuentras en $PWD" - exit -fi - -# Aplica las funciones tanto para archivos visibles como ocultos (solo funciona con bash) -shopt -s dotglob - -# Buscar carpetas y subcarptas de git y recrearlas en la raíz, NO SIRVE si las carpetas tienen espacio... fallará -for fol in $(find . -type d); do - if [[ $fol != ./.gi* && $fol == ./* ]]; then - mkdir -p $HOME/$fol - fi -done - -# Hace un link entre los archivos del dirctorio git a la raíz, exceptuando el script mismo que se ejecuta. NO ES RECLUSIVO. -for file in *; do - if [[ -f $HOME/$file ]]; then - rm $HOME/$file - ln $file $HOME/$file - echo $file" : fue reemplazado" - else - if [[ "$file" != "b.sh" ]] && [[ -f $file ]]; then - ln $file $HOME/$file - echo $file" : fue creado" - fi - fi -done - -# Ahora hay que copiar los archivos dentro de las subcarpetas (aplicar mi propia reclusividad con juegos de azar y mujersuelas) -for dir in $(find . -type d); do - if [[ "$dir" != ./.gi* && $dir == ./* ]]; then - cd $dir - n=$(( ${#HOME} + 7 )) - path=${PWD:$n} - if [[ -n $path ]];then - for file in *; do - if [[ -f $HOME/$path/$file ]]; then - rm $HOME/$path/$file - ln $file $HOME/$path/$file 2>/dev/null - echo $path/$file" : fue reemplazado" - else - ln $file $HOME/$path/$file 2>/dev/null - echo $path/$file" : fue creado" - fi - done - cd /git/dotAle - fi - fi -done - -# Crear historial para zsh -if [[ -e $HOME/.cache/zsh/history ]]; then - echo "Ya existe historial de zsh" -else - mkdir -p $HOME/.cache/zsh - touch $HOME/.cache/zsh/hist -fi - -# Cambiar ubicación de .zcompdump (funciones de autocompletado de zsh) -if [[ -e $HOME/.zcompdump ]]; then - rm $HOME/.zcompdump -fi -touch $HOME/.cache/zsh/.zcompdump -compinit -d $HOME/.cache/zsh/.zcompdump - -# Asegurarse de que ZSH sea el shell por defecto -chsh -s $(which zsh) - -# Mover los scripts a ubicación PATH (es necesario root access) -if [[ -e /mbin ]]; then - rm -rf /mbin -fi -mv $HOME/mbin/ / diff --git a/bashrc b/bashrc new file mode 100644 index 0000000..827e97e --- /dev/null +++ b/bashrc @@ -0,0 +1,7 @@ +fastfetch + +alias ls='ls --color -lh' +alias la='ls --color -lah' +alias rm='rm -rf' +alias ip='ip -br -c a' +alias clear='clear && fastfetch' diff --git a/config/kak/kakrc b/config/kak/kakrc new file mode 100644 index 0000000..ebd5a00 --- /dev/null +++ b/config/kak/kakrc @@ -0,0 +1,14 @@ +colorscheme desertex + +add-highlighter global/ number-lines -hlcursor -relative +add-highlighter global/ wrap -word -indent +add-highlighter global/ show-matching +add-highlighter global/ regex \h+$ 0:Error + +set-option global tabstop 4 +set-option global indentwidth 4 +set-option global scrolloff 8,3 + +map global normal q :wq +map global normal Q :q! +#map global normal W :w <-- la idea era esa pero me afecta a la funcionalidad de seleccionar multiples palabras, lo dejo para recordar mi error diff --git a/ssh/config b/ssh/config new file mode 100644 index 0000000..f6b3606 --- /dev/null +++ b/ssh/config @@ -0,0 +1,46 @@ +# $OpenBSD: ssh_config,v 1.37 2025/05/06 05:40:56 djm Exp $ + +# This is the ssh client system-wide configuration file. See +# ssh_config(5) for more information. This file provides defaults for +# users, and the values can be changed in per-user configuration files +# or on the command line. + +# Configuration data is parsed as follows: +# 1. command line options +# 2. user-specific file +# 3. system-wide file +# Any configuration value is only changed the first time it is set. +# Thus, host-specific definitions should be at the beginning of the +# configuration file, and defaults at the end. + +# Site-wide defaults for some commonly used options. For a comprehensive +# list of available options, their meanings and defaults, please see the +# ssh_config(5) man page. + +Host * + SetEnv TERM=xterm +# ForwardAgent no +# ForwardX11 no +# PasswordAuthentication yes +# HostbasedAuthentication no +# GSSAPIAuthentication no +# GSSAPIDelegateCredentials no +# BatchMode no +# CheckHostIP no +# AddressFamily any +# ConnectTimeout 0 +# StrictHostKeyChecking ask +# IdentityFile ~/.ssh/id_rsa +# IdentityFile ~/.ssh/id_ecdsa +# IdentityFile ~/.ssh/id_ed25519 +# Port 22 +# Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc +# MACs hmac-md5,hmac-sha1,umac-64@openssh.com +# EscapeChar ~ +# Tunnel no +# TunnelDevice any:any +# PermitLocalCommand no +# VisualHostKey no +# ProxyCommand ssh -q -W %h:%p gateway.example.com +# RekeyLimit 1G 1h +# UserKnownHostsFile ~/.ssh/known_hosts.d/%k diff --git a/zshrc b/zshrc index 52f6bb5..7c59bdb 100644 --- a/zshrc +++ b/zshrc @@ -33,6 +33,7 @@ _comp_options+=(globdots) # Importar aliases source $XDG_CONFIG_HOME/zsh/aliases.zsh +source $XDG_CONFIG_HOME/zsh/user.zsh ## PLUGINS # Load syntax highlighting; should be last. Source: https://github.com/zdharma/fast-syntax-highlighting -- 2.47.3