I3笔记本电脑配置:如何将性能提高到100%?

我最近发现我的笔记本电脑运行不佳。它缺乏将所有内容整合在一起的能力:Vim(+ 20个插件),VSCode(+相同数量的扩展名),Google Chrome(+ 20个选项卡)等等。在配备4GB RAM的笔记本电脑上,这似乎是一个常见的问题,但我没有放弃。我喜欢笔记本电脑,因为它们体积小巧,而且可以在任何地方使用电池供电。我只需要考虑如何释放额外的RAM并提高能源效率。








, " "




, , 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


此外,我们将绑定所有我们无需思考即可执行的主要功能,



# 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


让我们做一个自动启动部分



### 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是一个i3版本,增加了许多新功能。其中之一是增加间隙,在外观上看起来非常好。



### 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


发生了什么?



结果是i3上的装配极简,可在笔记本电脑上很好地工作并提供良好的性能。





由于我已经编写了许多配置(在屏幕截图中完全可见),因此可以在Great i3存储库中找到它们

还有几个屏幕截图










All Articles