Configuración del portátil I3: ¿cómo aumentar el rendimiento hasta un 100%?

Recientemente me di cuenta de que mi computadora portátil no estaba funcionando bien. Carece del poder para tomar todo junto: Vim (+ 20 complementos), VSCode (+ la misma cantidad de extensiones), Google Chrome (+ 20 pestañas), etc. Parece un problema común en las computadoras portátiles con 4 GB de RAM, pero no me rendí. Me encantan los portátiles porque son compactos y también porque pueden funcionar con batería en cualquier lugar. Solo necesitaba pensar en cómo liberar RAM adicional y también aumentar la eficiencia energética.








, " "




, , Arch Linux. , . , AUR .





, . (KDE), - , . DE' - .










( - )



sudo pacman -Sy --noconfirm i3 i3-gaps base-devel rofi okular feh vim code picom kitty ranger git xdotool xautolock i3lock-color scrot imagemagick rxvt-unicode urxvt-perls


,





?



xwinwrap .gif
polybar ,
i3
i3-gaps
base-devel polybar
rofi
okular
zathura ( , )
feh ,
vim
code
picom ( , , )
kitty
urxvt
ranger
git
xdotool ,
xautolock , i3-lock
i3lock-color i3lock.
scrot
imagemagick , ( , , )


i3



i3 — , , , , "" . ()



i3 , , . — $Mod. , i3. .



### Tweaks ###
# Set main key (Win)
set $mod Mod4


$mod



# Press MOD key and click on mouse to move your window
floating_modifier $mod

# Focus doesn't follow the mouse
focus_follows_mouse no


, , i3



# Fonts
font pango: JetBrains Mono 10


(, , ). : i3 (Tilling, Fullscreen, Tabbed, Float, Stacking), , . $mod + f, , :



# Maximum width for floating windows
floating_minimum_size 400 x 350
floating_maximum_size 1800 x 900

# (1920 - 10)/2 and (1080 - 10)/2
for_window [class=".*"] floating enable
for_window [class=".*"] resize set 955 535
for_window [class=".*"] focus


, (1920 - 10)/2 and (1080 - 10)/2 , ( ) 5 (5 ).

.





## Keyboard Settings ##
# Apps
bindsym $mod+Return exec kitty
bindsym $mod+Mod1+r exec "kitty sh -c 'ranger'"
bindsym $mod+Mod1+g exec google-chrome-stable
bindsym $mod+Mod1+c exec code
bindsym $mod+Mod1+v exec dolphin
bindsym Print exec spectacle


Además, enlazaremos todas las funciones principales que realizamos sin pensar, y que deben ser



# System / Volume
bindsym XF86AudioMute "exec amixer -D pulse sset Master toggle && notify-send \"Volume\" \"Sound is (un)muted\" --urgency low"
bindsym XF86AudioRaiseVolume "exec amixer -D pulse sset Master 5%+ && notify-send \"Volume\" \"Volume added +5%\n    Volume level is now $(amixer -D pulse get Master | awk -F 'Left:|[][]' 'BEGIN {RS=\"\"}{ print $3 }')\" --urgency low"
bindsym XF86AudioLowerVolume "exec amixer -D pulse sset Master 5%- && notify-send \"Volume\" \"Volume added -5%\n    Volume level is now $(amixer -D pulse get Master | awk -F 'Left:|[][]' 'BEGIN {RS=\"\"}{ print $3 }')\" --urgency low"

# System / Brightness
bindsym XF86MonBrightnessDown exec xbacklight -dec 5
bindsym XF86MonBrightnessUp exec xbacklight -inc 5

# Moving from one window to another
bindsym $mod+h focus left
bindsym $mod+j focus down
bindsym $mod+k focus up
bindsym $mod+l focus right

# Choose one of your workspaces
bindsym $mod+1 workspace $workspace1
bindsym $mod+2 workspace $workspace2
bindsym $mod+3 workspace $workspace3
bindsym $mod+4 workspace $workspace4

# Move window to the workspace
bindsym $mod+Shift+1 move container to workspace $workspace1
bindsym $mod+Shift+2 move container to workspace $workspace2
bindsym $mod+Shift+3 move container to workspace $workspace3
bindsym $mod+Shift+4 move container to workspace $workspace4

## Floating manipulation ##
# Make window floating
bindsym $mod+f floating toggle
# Change focus
bindsym $mod+Shift+f focus mode_toggle

# Move windows
bindsym $mod+Shift+h move left 20px
bindsym $mod+Shift+j move down 20px
bindsym $mod+Shift+k move up 20px
bindsym $mod+Shift+l move right 20px

# Resizing Windows
bindsym $mod+Ctrl+l resize shrink width 10 px or 10 ppt
bindsym $mod+Ctrl+k resize grow height 10 px or 10 ppt
bindsym $mod+Ctrl+j resize shrink height 10 px or 10 ppt
bindsym $mod+Ctrl+h resize grow width 10 px or 10 ppt

# Make window fullscreen
bindcode 95 fullscreen toggle

# Reload Configuration
bindsym $mod+p reload

# Kill a window
bindsym $mod+x exec xdotool getwindowfocus windowkill


Hagamos una sección de inicio automático



### Autostart ###
# Lockscreen after 10min delay
exec --no-startup-id "$HOME/.config/i3/lockscreen"
# Convert background gif to jpg
exec --no-startup-id convert -verbose $HOME/.config/i3/{gif.gif,gif.jpg}
# Generate Colorscheme
exec_always --no-startup-id wal -i $HOME/.config/i3/gif-0.jpg
# Compositor
exec_always --no-startup-id "killall -q picom; picom --config $HOME/.config/picom.conf"
# Language
exec --no-startup-id setxkbmap -model pc105 -layout us,ru -option grp:win_space_toggle
# Dunst
exec --no-startup-id dunst
# Kitty
exec kitty
# Dropbox
exec --no-startup-id dropbox &
# Polybar
exec_always --no-startup-id $HOME/.config/polybar/launch.sh
# Cursor
exec_always --no-startup-id xsetroot -cursor_name left_ptr


i3-gaps es una compilación de i3 que agrega muchas características nuevas. Uno de ellos es agregar espacios, lo que visualmente se ve muy bien.



### i3-gaps ###
# Borders for windows
for_window [class=".*"] border pixel 5

# Gaps for i3bar
for_window [class="i3bar"] gaps outer current set 10

# Gaps
gaps inner 10
gaps outer 4

### Topbar and color theme ###
# Color theme of borders
client.focused              #bf616a #2f343f #d8dee8 #bf616a #d8dee8
client.focused_inactive     #2f343f #kf343f #d8dee8 #2f343f #2f343f
client.unfocused            #2f343f #2f343f #d8dee8 #2f343f #2f343f
client.urgent               #2f343f #2f343f #d8dee8 #2f343f #2f343f
client.placeholder          #2f343f #2f343f #d8dee8 #2f343f #2f343f
client.background           #2f343f


¿Que pasó?



Y el resultado es un montaje bastante minimalista en i3, que funciona muy bien en portátiles y ofrece un buen rendimiento.





Como he escrito muchas configuraciones (que se pueden ver claramente en la captura de pantalla), se pueden encontrar en el repositorio Great i3 .

Un par de capturas de pantalla más










All Articles