Skip to content

Commit b2a5af7

Browse files
author
dotfiles-bot
committed
feat: Optimizar editores y shells restantes para 1366x768
EDITORES: Vim (.vimrc): - Números de línea relativos - Lazyredraw + ttyfast (performance) - GUI sin toolbar/menubar/scrollbar - Fuente 9pt - Statusline compacto - Keymaps útiles Emacs (init.el): - Sin menu-bar/tool-bar/scroll-bar (~55px ganados) - Fuente 9pt (height 90) - Sin animaciones/smooth scrolling - GC threshold aumentado (performance) - Números de línea relativos - Modeline compacto - Tema wombat built-in SHELLS: Fish (config.fish): - Prompt 1 línea compacto - History 5000 - Aliases útiles (ls, grep, navegación) - Función mkcd - FZF integration - Greeting deshabilitado Starship (starship.toml): - Formato 1 línea compacto - Command timeout 500ms (performance) - Scan timeout 30ms - Módulos pesados OFF (nodejs, python, rust, etc) - Git status compacto - Directory truncation optimizado Optimizaciones consistentes con resto de dotfiles para ThinkPad L420
1 parent 021fa54 commit b2a5af7

4 files changed

Lines changed: 302 additions & 29 deletions

File tree

modules/editor/emacs/init.el

Lines changed: 70 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,73 @@
1-
(setq user-full-name "Pablo Lezaeta")
2-
(setq user-mail-address "prflr88@gmail.com")
1+
;; init.el - Emacs optimizado para ThinkPad L420 (1366x768)
32

4-
(require 'package)
5-
(setq package-enable-at-startup nil)
6-
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
7-
(package-initialize)
3+
;; ===== PERFORMANCE =====
4+
;; Aumentar garbage collection threshold
5+
(setq gc-cons-threshold 100000000)
6+
(setq read-process-output-max (* 1024 1024))
87

9-
(set-language-environment "UTF-8")
8+
;; ===== UI OPTIMIZADA PARA 1366x768 =====
9+
;; Deshabilitar elementos UI innecesarios (ganar espacio)
10+
(menu-bar-mode -1) ; Sin menu bar
11+
(tool-bar-mode -1) ; Sin toolbar (~40px ganados)
12+
(scroll-bar-mode -1) ; Sin scrollbar (~15px ganados)
1013

11-
(provide 'init)
14+
;; Fuente pequeña para pantalla pequeña
15+
(set-face-attribute 'default nil :height 90) ; 9pt
16+
17+
;; Números de línea compactos
18+
(global-display-line-numbers-mode 1)
19+
(setq display-line-numbers-type 'relative)
20+
21+
;; ===== PERFORMANCE GPU LIMITADA =====
22+
;; Sin animaciones/smooth scrolling
23+
(setq scroll-conservatively 1)
24+
(setq scroll-step 1)
25+
(setq mouse-wheel-scroll-amount '(1 ((shift) . 1)))
26+
(setq mouse-wheel-progressive-speed nil)
27+
28+
;; ===== CONFIGURACIÓN BÁSICA =====
29+
;; No crear archivos backup (~)
30+
(setq make-backup-files nil)
31+
(setq auto-save-default nil)
32+
33+
;; UTF-8
34+
(prefer-coding-system 'utf-8)
35+
(set-default-coding-systems 'utf-8)
36+
(set-terminal-coding-system 'utf-8)
37+
(set-keyboard-coding-system 'utf-8)
38+
39+
;; Resaltar paréntesis
40+
(show-paren-mode 1)
41+
(setq show-paren-delay 0)
42+
43+
;; Auto-revert buffers
44+
(global-auto-revert-mode 1)
45+
46+
;; Indentación
47+
(setq-default tab-width 4)
48+
(setq-default indent-tabs-mode nil)
49+
50+
;; ===== TEMA =====
51+
(load-theme 'wombat t) ; Tema oscuro built-in
52+
53+
;; ===== SPLITS OPTIMIZADOS =====
54+
;; Splits horizontales abajo, verticales a la derecha
55+
(setq split-height-threshold nil)
56+
(setq split-width-threshold 160)
57+
58+
;; ===== KEYBINDINGS =====
59+
;; Más como editores modernos
60+
(global-set-key (kbd "C-s") 'save-buffer)
61+
(global-set-key (kbd "C-f") 'isearch-forward)
62+
(global-set-key (kbd "C-z") 'undo)
63+
64+
;; ===== MODELINE COMPACTO =====
65+
(setq-default mode-line-format
66+
'("%e" mode-line-front-space
67+
mode-line-buffer-identification " "
68+
mode-line-position
69+
(vc-mode vc-mode)
70+
" " mode-line-modes mode-line-end-spaces))
71+
72+
;; ===== FINAL =====
73+
(message "Emacs optimizado para ThinkPad L420 (1366x768) cargado")

modules/editor/vim/.vimrc

Lines changed: 86 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,92 @@
1-
" Vim - .vimrc mínimo
1+
" .vimrc - Vim optimizado para ThinkPad L420 (1366x768)
2+
" Similar a init.vim pero para Vim clásico
3+
4+
" ===== CONFIGURACIÓN BÁSICA =====
25
set nocompatible
36
syntax on
4-
set number
5-
set tabstop=2
6-
set shiftwidth=2
7+
filetype plugin indent on
8+
9+
" ===== OPTIMIZACIONES PANTALLA 1366x768 =====
10+
" Números de línea
11+
set number relativenumber
12+
13+
" Statusline siempre visible
14+
set laststatus=2
15+
16+
" Tabline solo si hay >1 tab
17+
set showtabline=1
18+
19+
" Command height reducido
20+
set cmdheight=1
21+
22+
" ===== PERFORMANCE =====
23+
set lazyredraw
24+
set ttyfast
25+
set updatetime=300
26+
set timeoutlen=500
27+
set synmaxcol=200
28+
29+
" ===== SPLITS =====
30+
set splitbelow splitright
31+
set fillchars=vert:│,fold:─
32+
33+
" ===== FUENTE (GUI) =====
34+
if has('gui_running')
35+
set guifont=Cascadia\ Code:h9
36+
set guioptions-=T " Sin toolbar
37+
set guioptions-=m " Sin menubar
38+
set guioptions-=r " Sin scrollbar derecha
39+
set guioptions-=L " Sin scrollbar izquierda
40+
endif
41+
42+
" ===== INDENTACIÓN =====
43+
set tabstop=4
44+
set shiftwidth=4
745
set expandtab
46+
set autoindent
47+
set smartindent
48+
49+
" ===== BÚSQUEDA =====
50+
set ignorecase
51+
set smartcase
52+
set incsearch
53+
set hlsearch
54+
55+
" ===== CLIPBOARD =====
856
set clipboard=unnamedplus
957

10-
" Marcador para gestor de plugins básico (vim-plug)
11-
if empty(glob('~/.vim/autoload/plug.vim'))
12-
" plug.vim no está instalado; instalar manualmente o ignorar
58+
" ===== MOUSE =====
59+
set mouse=a
60+
61+
" ===== WRAP =====
62+
set nowrap
63+
set linebreak
64+
65+
" ===== BACKUP =====
66+
set nobackup
67+
set nowritebackup
68+
set noswapfile
69+
70+
" ===== WILDMENU =====
71+
set wildmenu
72+
set wildmode=longest:full,full
73+
74+
" ===== COLORES =====
75+
if has('termguicolors')
76+
set termguicolors
1377
endif
78+
set background=dark
79+
silent! colorscheme desert
80+
81+
" ===== KEYMAPS =====
82+
let mapleader = " "
83+
nnoremap <leader>w :w<CR>
84+
nnoremap <leader>q :q<CR>
85+
nnoremap <C-h> <C-w>h
86+
nnoremap <C-j> <C-w>j
87+
nnoremap <C-k> <C-w>k
88+
nnoremap <C-l> <C-w>l
89+
nnoremap <leader>h :noh<CR>
90+
91+
" ===== STATUSLINE COMPACTO =====
92+
set statusline=%<%f\ %h%m%r%=%-14.(%l,%c%V%)\ %P

modules/shell/fish/config.fish

Lines changed: 63 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,64 @@
1-
## Configuración de fish movida a la ruta XDG esperada
2-
# Este archivo estaba previamente en la raíz del módulo (lo que creaba $HOME/config.fish).
3-
# El instalador lo enlazará a $HOME/.config/fish/config.fish
1+
# config.fish - Fish Shell optimizado para ThinkPad L420 (1366x768)
42

5-
set -g -x PATH $HOME/bin $PATH
6-
# prompt y comportamiento básico
7-
set -g theme_nerd_fonts yes
3+
# ===== PROMPT COMPACTO (1 línea para pantalla pequeña) =====
4+
# Prompt simple: usuario@host:dir$
5+
function fish_prompt
6+
set_color green
7+
echo -n (whoami)
8+
set_color normal
9+
echo -n '@'
10+
set_color green
11+
echo -n (prompt_hostname)
12+
set_color normal
13+
echo -n ':'
14+
set_color blue
15+
echo -n (prompt_pwd)
16+
set_color normal
17+
echo -n '$ '
18+
end
19+
20+
# ===== HISTORY OPTIMIZADO =====
21+
# Reducido para ThinkPad
22+
set -g fish_history_max 5000
23+
24+
# ===== ALIASES =====
25+
# Navegación
26+
alias .. 'cd ..'
27+
alias ... 'cd ../..'
28+
alias .... 'cd ../../..'
29+
30+
# ls con colores
31+
alias ls 'ls --color=auto -h'
32+
alias ll 'ls -la'
33+
alias la 'ls -A'
34+
alias l 'ls -CF'
35+
36+
# grep con colores
37+
alias grep 'grep --color=auto'
38+
39+
# Seguridad
40+
alias rm 'rm -i'
41+
alias cp 'cp -i'
42+
alias mv 'mv -i'
43+
44+
# ===== VARIABLES =====
45+
set -gx EDITOR nvim
46+
set -gx VISUAL nvim
47+
set -gx PAGER less
48+
49+
# ===== FZF INTEGRATION =====
50+
# Si fzf está instalado
51+
if type -q fzf
52+
set -gx FZF_DEFAULT_OPTS '--height 40% --layout=reverse --border'
53+
end
54+
55+
# ===== FUNCIONES ÚTILES =====
56+
# Crear directorio y entrar
57+
function mkcd
58+
mkdir -p $argv[1]
59+
and cd $argv[1]
60+
end
61+
62+
# ===== PERFORMANCE =====
63+
# Deshabilitar greeting
64+
set fish_greeting
Lines changed: 83 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,87 @@
1-
[prompt]
2-
add_newline = true
3-
format = "${username}@${hostname} ${directory} ${git_branch} ${git_state}"
1+
# starship.toml - Starship Prompt optimizado para ThinkPad L420 (1366x768)
42

5-
[git_branch]
6-
symbol = ""
3+
# ===== FORMATO COMPACTO PARA PANTALLA PEQUEÑA =====
4+
# Prompt en 1 línea para maximizar espacio vertical
5+
6+
# Timeout rápido (performance)
7+
command_timeout = 500
8+
scan_timeout = 30
79

10+
# Formato del prompt (compacto)
11+
format = """
12+
[╭─](bold green)\
13+
$username\
14+
[@](bold white)\
15+
$hostname\
16+
[](bold white)\
17+
$directory\
18+
$git_branch\
19+
$git_status\
20+
[\\$](bold green)
21+
"""
22+
23+
# ===== CHARACTER =====
824
[character]
9-
success_symbol = ">"
10-
error_symbol = "x"
25+
success_symbol = "[➜](bold green)"
26+
error_symbol = "[✗](bold red)"
27+
28+
# ===== DIRECTORY =====
29+
[directory]
30+
truncation_length = 3
31+
truncate_to_repo = true
32+
style = "bold cyan"
33+
format = "[$path]($style) "
34+
35+
# ===== USERNAME =====
36+
[username]
37+
style_user = "bold green"
38+
style_root = "bold red"
39+
format = "[$user]($style)"
40+
show_always = true
41+
42+
# ===== HOSTNAME =====
43+
[hostname]
44+
ssh_only = false
45+
format = "[$hostname](bold green)"
46+
disabled = false
47+
48+
# ===== GIT BRANCH =====
49+
[git_branch]
50+
symbol = " "
51+
style = "bold purple"
52+
format = "[$symbol$branch]($style) "
53+
54+
# ===== GIT STATUS =====
55+
[git_status]
56+
format = "([\\[$all_status$ahead_behind\\]]($style) )"
57+
style = "bold red"
58+
conflicted = "🏳"
59+
ahead = "⇡${count}"
60+
behind = "⇣${count}"
61+
diverged = "⇕⇡${ahead_count}⇣${behind_count}"
62+
untracked = "?"
63+
stashed = "$"
64+
modified = "!"
65+
staged = "+"
66+
renamed = "»"
67+
deleted = ""
68+
69+
# ===== DESHABILITAR MÓDULOS PESADOS =====
70+
# Para performance en hardware limitado
71+
[package]
72+
disabled = true
73+
74+
[nodejs]
75+
disabled = true
76+
77+
[python]
78+
disabled = true
79+
80+
[rust]
81+
disabled = true
82+
83+
[golang]
84+
disabled = true
1185

12-
# Ejemplo de configuración de starship — edítalo para tu entorno.
86+
[docker_context]
87+
disabled = true

0 commit comments

Comments
 (0)