自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

如何在Arch Linux搭建高效便捷的平鋪式桌面

系統(tǒng) Linux
關(guān)于ArchLinux請(qǐng)自己谷歌度娘,由于整個(gè)工作環(huán)境都是自己從頭開始搭建的,最是熟悉和順手,再加上神器yaourt,滾動(dòng)更新(一年多來未滾掛過),十分給力的Wiki,簡(jiǎn)直愛不釋手。筆者已經(jīng)在主力機(jī)上運(yùn)行這套工作環(huán)境一年多,暫未感到任何不適。

一不注意竟然已經(jīng)三個(gè)多月沒寫文章了,十一月份總算找到感覺比較滿意的實(shí)習(xí)工作了,同時(shí)把近視給弄好了,已經(jīng)有十多年沒有這么清晰地看過這個(gè)世界了:-D

前言

關(guān)于ArchLinux請(qǐng)自己谷歌度娘,由于整個(gè)工作環(huán)境都是自己從頭開始搭建的,最是熟悉和順手,再加上神器yaourt,滾動(dòng)更新(一年多來未滾掛過),十分給力的Wiki,簡(jiǎn)直愛不釋手。

筆者已經(jīng)在主力機(jī)上運(yùn)行這套工作環(huán)境一年多,暫未感到任何不適。

如果對(duì)Linux不是很熟悉且不太樂于折騰的請(qǐng)繞過。

搭建完成后大概是下面這個(gè)樣子: 

 

 

桌面使用i3-gaps(i3wm的分支)+py3status+i3lock+LilyTerm。

  1. 選擇平鋪?zhàn)烂婀芾砥魇且驗(yàn)榭梢宰詣?dòng)排列所有打開的窗口,所有窗口操作使用快捷鍵實(shí)現(xiàn)、最大化利用工作區(qū)、最大化利用屏幕空間、占用資源小。
  2. 選擇i3-gaps是因?yàn)閕3wm的本身配置非常簡(jiǎn)單,i3-gaps在它的基礎(chǔ)之上增加窗口間隙調(diào)整的支持,方便把桌面弄得更漂亮一些。
  3. 選擇py3staus是因?yàn)樗С指嗟牟寮蛯傩耘渲谩=貓D中右下角顯示的信息分別是:內(nèi)存 內(nèi)存使用率|cpu使用率|cpu溫度|下行速度 上行速度|未讀郵件數(shù)|當(dāng)前時(shí)間|音量|單機(jī)截圖|DPMS|其他軟件。
  4. 選擇LilyTerm是因?yàn)橐子谂渲煤蛯?duì)中文支持比較好。

整個(gè)桌面最多可以開啟10個(gè)工作區(qū),我的布置是這樣的:

  1. 窗口1(1:Info)用來運(yùn)行g(shù)lances+系統(tǒng)命令。
  2. 窗口2(2:Web)運(yùn)行瀏覽器。
  3. 窗口3~8(3~8:Work)運(yùn)行開發(fā)相關(guān)的程序。
  4. 窗口9(9:Other)虛擬機(jī)運(yùn)行windows10。
  5. 窗口10(10:Other)運(yùn)行音樂播放器。
  6. 同時(shí)在一個(gè)可切換顯示和隱藏的小窗口中運(yùn)行ydcv,需要翻譯的時(shí)候就切換出來相當(dāng)方便。

我說這么多1 2 3 4…………只為了說明一點(diǎn):只要習(xí)慣了自己配置的快捷鍵和空間布局,工作效率颼颼地往上升。習(xí)慣了在平鋪式的桌面中開發(fā)后,再回到windows這類層疊式的有種生不如死的感覺= =

基本系統(tǒng)的安裝

ArchLinux的Wiki是十分完善的,且大多數(shù)常用的文檔都有中文版,系統(tǒng)的安裝主要也是參照Installation guide (簡(jiǎn)體中文)),如果按照以下流程安裝系統(tǒng)時(shí)和官方Wiki有沖突,以官方Wiki為準(zhǔn)。

  1. 執(zhí)行ping www.baidu.com測(cè)試網(wǎng)絡(luò)是否可用,安裝過程中需要用到網(wǎng)絡(luò)。
  2. 執(zhí)行timedatectl set-ntp true設(shè)置時(shí)間自動(dòng)同步。
  3. 執(zhí)行fdisk -l查看要安裝的目標(biāo)硬盤,并用fdisk對(duì)硬盤進(jìn)行操作,我要把系統(tǒng)安裝到/dev/sda這個(gè)硬盤中。
  4. 執(zhí)行fdisk /dev/sda,其中/dev/sda是步驟3中找到的,fdisk的詳細(xì)使用方法請(qǐng)查閱Wiki,如果你的硬盤是GPT磁盤分區(qū),要記得創(chuàng)建一個(gè)EFI分區(qū)。
    1. 我是MBR磁盤分區(qū),在進(jìn)入fdisk工具后:
      1. 重復(fù)執(zhí)行d命令直到刪除所有已有分區(qū)。
      2. 執(zhí)行n命令創(chuàng)建分區(qū),Partition type、Partition number、First sector直接回車用默認(rèn)值,Last sector輸入+512M表示給該分區(qū)分配512M大小的空間。
      3. 執(zhí)行n命令創(chuàng)建根分區(qū),分配45G的空間
      4. 執(zhí)行n命令并一路回車,把硬盤所有剩余空間都給home分區(qū), 如果有需要的話也可以選擇再分配一個(gè)swap分區(qū)。
      5. 執(zhí)行p命令查看是否和預(yù)想中的分區(qū)情況一致。
      6. 如果上一個(gè)步驟沒問題的話,執(zhí)行w命令保存并退出。
  5. 執(zhí)行mkfs.ext4 /dev/sda1格式化/dev/sda1分區(qū)為EXT4格式。
  6. 執(zhí)行mkfs.ext4 /dev/sda2格式化/dev/sda2分區(qū)為EXT4格式。
  7. 執(zhí)行mkfs.ext4 /dev/sda3格式化/dev/sda3分區(qū)為EXT4格式。
  8. 執(zhí)行mount /dev/sda2 /mnt掛載根分區(qū)。
  9. 執(zhí)行mkdir /mnt/boot和mkdir /mnt/home分別創(chuàng)建boot分區(qū)和home分區(qū)的掛載點(diǎn)。
  10. 執(zhí)行mount /dev/sda1 /mnt/boot和mount /dev/sda3 /mnt/home分別將對(duì)應(yīng)的分區(qū)掛載好。
  11. 執(zhí)行vim /etc/pacman.d/mirrorlist,刪除不需要的mirror,我只保留了163和中科大的mirror。
  12. 執(zhí)行pacman -Syy更新mirror數(shù)據(jù)庫(kù)。
  13. 執(zhí)行pacstrap /mnt base base-devel安裝基本系統(tǒng)。
  14. 執(zhí)行g(shù)enfstab -U /mnt >> /mnt/etc/fstab生成fstab文件。
  15. 執(zhí)行arch-chroot /mnt /bin/bash切換到新安裝的系統(tǒng)上。
  16. 執(zhí)行pacman -S vim安裝vim。
  17. 執(zhí)行l(wèi)n -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime設(shè)置時(shí)區(qū)。
  18. 執(zhí)行hwclock --systohc --utc設(shè)置時(shí)間標(biāo)準(zhǔn) 為 UTC。
  19. 執(zhí)行vim /etc/locale.gen修改本地化信息,移除en_US.UTF-8 UTF-8、zh_CN.UTF-8 UTF-8、zh_TW.UTF-8 UTF-8前面的#后保存。
  20. 執(zhí)行l(wèi)ocale-gen生成本地化信息。
  21. 執(zhí)行echo LANG=en_US.UTF-8 > /etc/locale.conf將系統(tǒng) locale 設(shè)置為en_US.UTF-8.
  22. 執(zhí)行echo myhostname > /etc/hostname修改主機(jī)名。
  23. 執(zhí)行systemctl enable dhcpcd設(shè)置dhcpcd自啟動(dòng)。
  24. 執(zhí)行passwd設(shè)置root密碼。
  25. 執(zhí)行pacman -S grub os-prober efibootmgr安裝grub、os-prober和efibootmgr。
  26. 安裝引導(dǎo)程序:
    1. grub-install --target=i386-pc /dev/sda
    2. grub-mkconfig -o /boot/grub/grub.cfg
  27. 執(zhí)行exit。
  28. 執(zhí)行umount -R /mnt。
  29. 執(zhí)行reboot

到此為止,基本系統(tǒng)已經(jīng)安裝完成,重啟后登陸root帳號(hào)開始搭建桌面環(huán)境。

搭建桌面環(huán)境

創(chuàng)建用戶和安裝常用的程序

  1. 執(zhí)行useradd -m yourusername創(chuàng)建新用戶,并執(zhí)行passwd yourusername設(shè)置登陸密碼。
  2. 執(zhí)行vim /etc/sudoers編輯sudo權(quán)限,復(fù)制一行root ALL=(ALL) ALL, 并替換其中的root為新用戶名,保存并退出。
  3. 執(zhí)行exit退出root用戶,并登陸新創(chuàng)建的用戶。
  4. 執(zhí)行sudo pacman -S alsa-utils xf86-video-vesa xorg xorg-xinit安裝聲卡、顯卡及xorg。
  5. 執(zhí)行sudo pacman -S zsh git unrar zip unzip openssh glances htop iftop screenfetch tree vlc wget net-tools安裝常用程序。

安裝oh-my-zsh

執(zhí)行sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"安裝oh-my-zsh,我們將使用它作為默認(rèn)shell。

執(zhí)行vim .zshrc編輯配置文件,修改ZSH_THEME的值可以更改shell的主題,主題可以到這里來查看,我個(gè)人比較喜歡使用rkj-repos這個(gè)主題。

在配置文件最底端加入一下代碼段為一些命令創(chuàng)建別名:

  1. alias ll='ls -l' 
  2. alias la='ls -a' 
  3. alias vi='vim' 
  4. alias svi='sudo vim' 
  5. alias grep='grep --color=auto' 
  6. alias install='sudo pacman -S' 
  7. alias remove='sudo pacman -Rcn' 
  8. alias upgrade='sudo pacman -Syu' 
  9. alias findProc='ps -ef | grep ' 
  10. alias docker='sudo docker ' 
  11. alias cls='printf "\033c"'  

編輯完成后保存并退出,執(zhí)行source .zshrc更新。

插件和其他的配置根據(jù)自己所需到這里查詢配置。

安裝yaourt

執(zhí)行sudo vim /etc/pacman.conf,在文件最底部加入以下文本后保存并退出:

  1. [archlinuxcn] 
  2. SigLevel = Optional TrustAll 
  3. Server   = https://mirrors.ustc.edu.cn/archlinuxcn/$arch  

然后執(zhí)行sudo pacman -Syu yaourt更新倉(cāng)庫(kù)數(shù)據(jù)庫(kù)并安裝yaourt。

接著再執(zhí)行install archlinuxcn-keyring安裝archlinuxcn的keyring,不然有些pacman的軟件包無法安裝。

配置桌面環(huán)境

配置i3wm

  1. 執(zhí)行install i3lock i3status compton dmenu feh, compton如果沒有裝的話會(huì)一些窗口效果會(huì)消失。因?yàn)閕3wm是沒有桌面圖標(biāo)這些東西的,所以我們通過dmenu來打開應(yīng)用程序。feh是用來設(shè)置壁紙的。
  2. 執(zhí)行yaourt i3-gaps安裝i3wm。

安裝好i3-gaps后,編輯~/.i3/config文件配置i3wm的快捷鍵和外觀等,其中mod鍵我設(shè)置為win鍵。

以下是我的快捷方式:

窗口管理

win+0 ~ win+9:切換工作區(qū)。

win+左:聚焦到左邊的窗口。

win+右:聚焦到右邊的窗口。

win+上:聚焦到上邊的窗口。

win+下:聚焦到下邊的窗口。

win+shift+左:移動(dòng)當(dāng)前聚焦的窗口到左邊。

win+shift+右:移動(dòng)當(dāng)前聚焦的窗口到右邊。

win+shift+上:移動(dòng)當(dāng)前聚焦的窗口到上邊。

win+shift+下:移動(dòng)當(dāng)前聚焦的窗口到下邊。

win+shift+0 ~ win+shift+9:將當(dāng)前聚焦的窗口移動(dòng)到指定的工作區(qū)中。

win+H:窗口水平分離,即新創(chuàng)建的窗口將會(huì)出現(xiàn)在當(dāng)前窗口的右側(cè)。win+V:窗口垂直分離,即新創(chuàng)建的窗口將會(huì)出現(xiàn)在當(dāng)前窗口的下側(cè)。

win+R:調(diào)整當(dāng)前聚焦的窗口的大小,在按完快捷鍵后再按方向鍵即可調(diào)整。win+F:切換當(dāng)前聚焦的窗口為全屏/非全屏。

ctrl+alt+W:關(guān)閉當(dāng)前聚焦的窗口。

win+shift+space:使當(dāng)前聚焦的窗口浮動(dòng)。

win+space:在浮動(dòng)的窗口和非浮動(dòng)的窗口之間切換焦點(diǎn)。

win+T:切換窗口顯示為邊框+標(biāo)題欄。

win+Y:切換窗口顯示為只有1像素的邊框。

win+U:切換窗口顯示為沒有邊框也沒有標(biāo)題欄,默認(rèn)為這種顯示方式,因?yàn)檫吙蚝蜆?biāo)題欄太丑而且太占空間了= =。

win+shift+ -:移動(dòng)當(dāng)前窗口到scratchpad中,即可以在需要的時(shí)候?qū)⑵湔{(diào)出來,不需要時(shí)將其隱藏。win+ -:切換scratchpad中的窗口的顯示與否,該功能我最常將用來創(chuàng)建一個(gè)運(yùn)行ydcv進(jìn)程的窗口來翻譯,相當(dāng)方便。

系統(tǒng)命令

win+回車:打開一個(gè)新的終端。

win+E:打開dmenu,會(huì)在屏幕頂部出現(xiàn)一個(gè)黑色輸入框,輸入程序名字按回車就會(huì)打開程序。

win+L:鎖屏。

win+E:打開資源管理器。

fn+音量+:音量上調(diào)5%。fn+音量-:音量下調(diào)5%。

win+shift+Q:調(diào)出系統(tǒng)命令。

在調(diào)出系統(tǒng)命令后,按O注銷會(huì)話、S關(guān)機(jī)、R重啟、Esc取消。

win+shift+C:重新加載i3wm的配置文件。

win+shift+R:重新啟動(dòng)i3wm,不會(huì)丟失已經(jīng)打開的窗口等信息。

win+shift+E:關(guān)閉i3wm,將會(huì)導(dǎo)致所有窗口被關(guān)閉。

以下是我的配置:

  1. #===============設(shè)置字體=============== 
  2. font pango:Source Code Pro, EmojiOne Color 10 
  3.  
  4. #===============定義$mod鍵為win鍵=============== 
  5. # customized 
  6. set $mod Mod4 
  7.  
  8. #===============設(shè)置窗口邊框=============== 
  9. new_window none 
  10. bindsym $mod+t border normal 
  11. bindsym $mod+y border pixel 1 
  12. bindsym $mod+u border none 
  13.  
  14.  
  15. #===============狀態(tài)欄=============== 
  16. bindsym $mod+m bar mode toggle 
  17. bar { 
  18.     i3bar_command i3bar -t 
  19. #    status_command i3status 
  20.     status_command py3status  
  21.     position bottom 
  22.     modifier Shift 
  23.     separator_symbol " | " 
  24.  
  25.     colors { 
  26.         background #000000CC 
  27.         #statusline #000000FF 
  28.         separator #B8F788 
  29.         focused_workspace  #B8F788 #000000AA 
  30.         active_workspace   #FFFFFF #FFFFFFAA 
  31.         inactive_workspace #AAAAAA #000000AA #AAAAAA 
  32.         urgent_workspace   #E57B85 #000000AA 
  33.     } 
  34.  
  35. #===============窗口間距=============== 
  36. gaps inner 6 
  37. gaps outer 0 
  38. smart_gaps on 
  39.  
  40. #===============系統(tǒng)命令=============== 
  41. set $mode_system  注銷(O) 關(guān)機(jī)(S) 重啟(R) 取消(Esc) 
  42. bindsym $mod+shift+q mode "$mode_system" 
  43. mode "$mode_system" { 
  44.     bindsym o exec i3-msg exit 
  45.     bindsym s exec systemctl poweroff 
  46.     bindsym r exec systemctl reboot 
  47.     bindsym Escape mode "default" 
  48.  
  49. #===============鼠標(biāo)聚焦=============== 
  50. focus_follows_mouse no 
  51.  
  52. #===============鎖屏快捷鍵=============== 
  53. # bindsym Mod4+l exec --no-startup-id i3lock -i '/home/huang/Pictures/Wallpapers/universe.png' 
  54. bindsym Mod4+l exec --no-startup-id i3lock -i 'path/to/lock/screen/wallpaper' 
  55.  
  56. #===============自動(dòng)啟動(dòng)fcitx=============== 
  57. exec --no-startup-id fcitx 
  58. bindsym $mod+e exec nautilus 
  59.  
  60. #===============音量控制=============== 
  61. bindsym XF86AudioRaiseVolume exec --no-startup-id amixer -q sset Master 5%+ 
  62. bindsym XF86AudioLowerVolume exec --no-startup-id amixer -q sset Master 5%- 
  63.  
  64. #===============浮動(dòng)窗口=============== 
  65. # use Mouse+Mod1 to drag floating windows to their wanted position 
  66. #floating_modifier $mod 
  67.  
  68. #===============打開終端=============== 
  69. # bindsym $mod+Return exec i3-sensible-terminal 
  70. bindsym $mod+Return exec lilyterm 
  71.  
  72. #===============關(guān)閉窗口=============== 
  73. bindsym Control+Mod1+w kill 
  74.  
  75. #===============打開dmenu=============== 
  76. # start dmenu (a program launcher) 
  77. bindsym $mod+d exec dmenu_run 
  78. # There also is the (new) i3-dmenu-desktop which only displays applications 
  79.  
  80. # bindsym Mod1+d exec --no-startup-id i3-dmenu-desktop 
  81.  
  82. # change focus 
  83. #bindsym $mod+$left focus left 
  84. #bindsym $mod+$down focus down 
  85. #bindsym $mod+$up focus up 
  86. #bindsym $mod+$right focus right 
  87.  
  88. # alternatively, you can use the cursor keys: 
  89. #===============窗口聚焦=============== 
  90. bindsym $mod+Left focus left 
  91. bindsym $mod+Down focus down 
  92. bindsym $mod+Up focus up 
  93. bindsym $mod+Right focus right 
  94.  
  95. move focused window 
  96. #bindsym $mod+Shift+$left move left 
  97. #bindsym $mod+Shift+$down move down 
  98. #bindsym $mod+Shift+$up move up 
  99. #bindsym $mod+Shift+$right move right 
  100.  
  101. # alternatively, you can use the cursor keys: 
  102. #===============窗口移動(dòng)=============== 
  103. bindsym $mod+Shift+Left move left 
  104. bindsym $mod+Shift+Down move down 
  105. bindsym $mod+Shift+Up move up 
  106. bindsym $mod+Shift+Right move right 
  107.  
  108. #===============窗口拆分模式=============== 
  109. bindsym $mod+h split h 
  110. bindsym $mod+v split v 
  111.  
  112. #===============切換全屏=============== 
  113. bindsym $mod+f fullscreen toggle 
  114.  
  115. #===============切換布局模式=============== 
  116. #bindsym $mod+s layout stacking 
  117. #bindsym $mod+w layout tabbed 
  118. #bindsym Mod1+e layout toggle split 
  119.  
  120. #===============切換窗口浮動(dòng)=============== 
  121. bindsym $mod+Shift+space floating toggle 
  122.  
  123. #===============浮動(dòng)/平鋪聚焦切換=============== 
  124. bindsym $mod+space focus mode_toggle 
  125.  
  126. #===============聚焦到父窗口=============== 
  127. #bindsym $mod+a focus parent 
  128.  
  129. #===============聚焦到子窗口=============== 
  130. #bindsym Mod1+d focus child 
  131.  
  132. #===============添加窗口到存儲(chǔ)=============== 
  133. bindsym $mod+Shift+minus move scratchpad 
  134.  
  135. #===============切換存儲(chǔ)器中的窗口=============== 
  136. # Show the next scratchpad window or hide the focused scratchpad window. 
  137. # If there are multiple scratchpad windows, this command cycles through them. 
  138. bindsym Mod1+minus scratchpad show 
  139.  
  140. #===============綁定workspace快捷鍵=============== 
  141. # switch to workspace 
  142. bindsym $mod+1 workspace 1:Info 
  143. bindsym $mod+2 workspace 2:Web 
  144. bindsym $mod+3 workspace 3:Work 
  145. bindsym $mod+4 workspace 4:Work 
  146. bindsym $mod+5 workspace 5:Work 
  147. bindsym $mod+6 workspace 6:Work 
  148. bindsym $mod+7 workspace 7:Work 
  149. bindsym $mod+8 workspace 8:Other 
  150. bindsym $mod+9 workspace 9:Other 
  151. bindsym $mod+0 workspace 10:Other 
  152.  
  153. #==============設(shè)置workspace默認(rèn)顯示到LVDS1=============== 
  154. workspace "1:Info" output LVDS1 
  155. workspace "2:Web" output LVDS1 
  156. workspace "3:Dev" output LVDS1 
  157. workspace "4:Dev" output LVDS1 
  158. workspace "5:Dev" output LVDS1 
  159. workspace "6:Dev" output LVDS1 
  160. workspace "7:Dev" output LVDS1 
  161. workspace "8:Music" output LVDS1 
  162. workspace "9:Other" output LVDS1 
  163. workspace "10:Other" output LVDS1 
  164.  
  165. #===============綁定移動(dòng)窗口到指定workspace快捷鍵=============== 
  166. move focused container to workspace 
  167. bindsym $mod+Shift+1 move container to workspace 1:Info 
  168. bindsym $mod+Shift+2 move container to workspace 2:Web 
  169. bindsym $mod+Shift+3 move container to workspace 3:Work 
  170. bindsym $mod+Shift+4 move container to workspace 4:Work 
  171. bindsym $mod+Shift+5 move container to workspace 5:Work 
  172. bindsym $mod+Shift+6 move container to workspace 6:Work 
  173. bindsym $mod+Shift+7 move container to workspace 7:Work 
  174. bindsym $mod+Shift+8 move container to workspace 8:Other 
  175. bindsym $mod+Shift+9 move container to workspace 9:Other 
  176. bindsym $mod+Shift+0 move container to workspace 10:Other 
  177.  
  178. #===============指定程序打開后出現(xiàn)在指定工作區(qū)=============== 
  179. assign [class="chrome"] 2:Web 
  180. # assign [class="idea"] 3:Dev 
  181. # assign [class="VirtualBox"] 9:Other 
  182.  
  183. #===============重新加載配置=============== 
  184. # reload the configuration file 
  185. bindsym $mod+Shift+c reload 
  186.  
  187. #===============重啟i3=============== 
  188. # restart i3 inplace (preserves your layout/session, can be used to upgrade i3) 
  189. bindsym $mod+Shift+r restart 
  190.  
  191. #===============退出i3=============== 
  192. # exit i3 (logs you out of your X session) 
  193. bindsym $mod+Shift+e exec "i3-nagbar -t warning -m '是否確定退出i3? 這將導(dǎo)致所有工作窗口被關(guān)閉.' -b '確定' 'i3-msg exit'" 
  194.  
  195. #===============調(diào)整窗口大小=============== 
  196. # resize window (you can also use the mouse for that) 
  197. mode "resize" { 
  198.         # same bindings, but for the arrow keys 
  199.         bindsym Left        resize shrink width 10 px or 10 ppt 
  200.         bindsym Down        resize grow height 10 px or 10 ppt 
  201.         bindsym Up          resize shrink height 10 px or 10 ppt 
  202.         bindsym Right       resize grow width 10 px or 10 ppt 
  203.  
  204.         # back to normal: Enter or Escape 
  205.         bindsym Return mode "default" 
  206.         bindsym Escape mode "default" 
  207.  
  208. #===============綁定調(diào)整窗口大小快捷鍵=============== 
  209. bindsym $mod+r mode "resize" 
  210.  
  211. #===============開啟i3時(shí)自啟動(dòng)項(xiàng)=============== 
  212. exec_always --no-startup-id feh --bg-fill path/to/background/image 
  213. exec i3-config-wizard 
  214. exec --no-startup-id i3-msg "workspace 1:Info" 
  215. exec compton &  

如果復(fù)制了我的配置文件,請(qǐng)修改path/to/background/image和path/to/lock/screen/wallpaper。

至此i3wm的配置已經(jīng)弄好了,就是這么簡(jiǎn)單= = 關(guān)于i3wm的詳細(xì)配置參考官方文檔。

配置py3status

  1. 執(zhí)行yaourt py3status安裝。

      py3status的配置文件在~/.i3status中,在配置i3wm的時(shí)候我們已經(jīng)在配置文件中啟用了py3status,在這一部分只需要配置要啟用的模塊即可,所有支持的模塊可以在這里找到。

  2. 執(zhí)行install noto-fonts-emoji安裝Emoji字體。

以下是我py3status的配置文件:

  1. general { 
  2.     output_format = "i3bar" 
  3.     colors = true 
  4.     color_good = "#BBBBBB" 
  5.     color_bad = "#CC1616" 
  6.     color_degraded = "#55858E" 
  7.     interval = 1 
  8.  
  9. order += "sysdata" 
  10. order += "cpu_usage" 
  11. order += "cpu_temperature 0" 
  12. order += "net_rate" 
  13. order += "imap" 
  14. order += "time" 
  15. order += "volume_status" 
  16. order += "static_string screenshot" 
  17. order += "dpms" 
  18.  
  19. sysdata { 
  20.     format = "📈 {mem_used}G 📉 {mem_used_percent}%" 
  21.     color = "#48CCCD" 
  22.  
  23. cpu_usage { 
  24.     format = "🔲 %usage" 
  25.     color = "#52D017" 
  26.  
  27. cpu_temperature 0 { 
  28.     format = "♨ %degrees °C" 
  29.     max_threshold = 65 
  30.     path = "/sys/class/thermal/thermal_zone0/temp" 
  31.     color = "#CCFB5D" 
  32.  
  33. net_rate { 
  34.     interfaces = "enp0s25" 
  35.     format = "🔻{down} 🔺{up}" 
  36.     color = "#FFDB58" 
  37.  
  38. imap { 
  39.     cache_timeout = 60 
  40.     format = "📩 {unseen}" 
  41.     imap_server = 'imap.gmail.com' 
  42.     mailbox = 'INBOX' 
  43.     name = 'you/name' 
  44.     password = 'you/mail/password' 
  45.     port = '993' 
  46.     user = 'your/mail' 
  47.     new_mail_color = "#F87431#F62217" 
  48.     on_click 1 = 'exec google-chrome-stable https://mail.google.com/mail' 
  49.     color = "#FCDFFF" 
  50.  
  51. time { 
  52.     format = "🕔 %Y-%m-%d %H:%M:%S" 
  53.     color = "#9E7BFF" 
  54.  
  55. volume_status { 
  56.     format = "🔊 {percentage}%" 
  57.     cache_timeout = 1 
  58.     device = "default" 
  59.     thresholds = [ 
  60.         (0, "#A0CFEC"), 
  61.         (10, "#82CAFF"), 
  62.         (20, "#79BAEC"), 
  63.         (30, "#3BB9FF"), 
  64.         (40, "#56A5EC"), 
  65.         (50, "#5CB3FF"), 
  66.         (60, "#1589FF"), 
  67.         (70, "#157DEC"), 
  68.         (80, "#306EFF"), 
  69.         (90, "#2B65EC"
  70.     ] 
  71.  
  72. static_string 'screenshot' { 
  73.     format = "🖥" 
  74.         on_click 1 = "exec gnome-screenshot" 
  75.         color = "#C44975" 
  76.  
  77. dpms { 
  78.     format_on = "🖥 DPMS" 
  79.     format_off = "🖥 DPMS" 
  80.     color_on = "#F9B7FF" 
  81.     color_off = "#6B9299" 
  82.  
  1. 我的配置文件中使用了imap模塊,需要配置郵箱相關(guān)的信息。
  2. volume_status模塊需要安裝pamixer和alsa-utils。
  3. 不同的Emoji字體會(huì)造成狀態(tài)欄的圖標(biāo)不一樣,我截圖中使用的是nodejs-emojione,這里的配置使用的是 noto-fonts-emoji,因?yàn)橛X得后者 比較好看= =。

配置LilyTerm

執(zhí)行install lilyterm安裝終端模擬器。

LilyTerm的配置文件在/etc/lilyterm.conf, 不過不建議直接修改配置文件,可以在啟動(dòng)i3wm后打開終端,在終端上右鍵即可進(jìn)行可視化配置。字體我使用的Source Code Pro+Noto Sans CJK SC

配置xinit

執(zhí)行vim ~/.xinitrx編輯xinit配置文件, 這一步的配置關(guān)系到i3wm的啟動(dòng)和搜狗輸入法的使用,將內(nèi)容修改如下:

  1. export LANG=zh_CN.UTF-8 
  2. export LANGUAGE=zh_CN:en_US 
  3. export LC_CTYPE=en_US.UTF-8 
  4.  
  5. export GTK_IM_MODULE=fcitx 
  6. export QT_IM_MODULE=fcitx 
  7. export XMODIFIERS=@im=fcitx 
  8.  
  9. exec i3 
  10. exec sogou-qimpanel  

修改完成后執(zhí)行startx就會(huì)發(fā)現(xiàn)桌面環(huán)境啟動(dòng)成功了。

執(zhí)行vim ~/.zshrc,在文件底部加入這一行[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && exec startx,這樣以后登陸系統(tǒng)后會(huì)自動(dòng)運(yùn)行startx登陸到桌面中。

搜狗輸入法

在桌面環(huán)境下打開一個(gè)終端(win+回車),執(zhí)行install fcitx-im fcitx-configtool fcitx-sogoupinyin安裝fcitx套件和搜狗輸入法。

安裝完成后右擊狀態(tài)欄最右側(cè)的小鍵盤,在設(shè)置中添加搜狗輸入法,然后重啟系統(tǒng),就會(huì)發(fā)現(xiàn)輸入法可以使用了,輸入法的切換默認(rèn)按鍵為ctrl+space。

Chrome

執(zhí)行install google-chrome安裝Chrome瀏覽器,安裝完成后按win+d調(diào)出dmenu,輸入chrome回車,即可運(yùn)行Chrome。

資源管理器

執(zhí)行install nautilus安裝gnome的資源管理器,安裝完成后可以通過win+e打開。

為了能夠讓nautilus識(shí)別安卓手機(jī),需要執(zhí)行install gvfs-mtp來支持MTP。

安裝PDF閱讀器

執(zhí)行install foxitreader安裝福昕PDF閱讀軟件, 安裝完成后按win+d調(diào)出dmenu,輸入foxitreader回車,即可運(yùn)行foxitreader。

截屏

執(zhí)行install gnome-screenshot安裝gnome的截屏軟件,安裝完成后點(diǎn)擊狀態(tài)欄中的截屏按鈕就會(huì)自動(dòng)截屏。

執(zhí)行yaourt shutter可以安裝功能強(qiáng)大的截圖軟件shutter,安裝完成后按win+d調(diào)出dmenu,輸入shutter回車,即可運(yùn)行shutter。

WPS

執(zhí)行install wps-office安裝wps套件,雖然絕大多數(shù)時(shí)候我都會(huì)在虛擬機(jī)下開windows編輯文檔,但是只是查看的話還是很方便的。

翻譯:ydcv

執(zhí)行install ydcv安裝ydcv,通過它再配scratchpad功能,在簡(jiǎn)單翻譯的情境下比任何翻譯工具都要好用。

結(jié)尾

做到這里差不多桌面環(huán)境都搭建好了,筆者是實(shí)體機(jī)上邊安裝邊寫的文章,大體上不會(huì)有什么問題,如果安裝過程中有疑問或者不對(duì)的地方歡迎提出討論。

責(zé)任編輯:龐桂玉 來源: segmentfault
相關(guān)推薦

2023-02-14 13:32:55

2022-11-30 12:17:50

2023-02-21 11:30:38

2022-07-26 17:25:38

Linux

2022-11-28 08:28:44

2022-10-21 10:31:36

Arch LinuxSnap

2018-10-23 09:45:05

Arch LinuxGRUB命令

2018-07-19 09:20:47

LinuxArchLinuxRPM包

2016-11-09 09:48:03

Arch Linux設(shè)定WiFi網(wǎng)絡(luò)

2018-06-11 08:50:46

LinuxArch Linux降級(jí)軟件包

2019-11-18 10:00:05

Linux桌面添加用戶

2022-12-01 15:34:26

Arch LinuxOpenOffice

2022-07-20 21:08:35

Arch LinuxLinuxYay AUR

2020-05-28 08:45:21

Arch LinuxLinuxKDE Plasma

2018-07-10 08:59:07

LinuxArch Linux軟件包

2023-03-07 10:50:42

Linux命令系統(tǒng)

2022-05-20 13:46:36

Linux激活Linux水印

2021-02-19 19:02:53

Material ShGNOME桌面Linux

2021-07-23 21:00:39

Hash LinuxArch LinuxLinux

2022-03-23 15:11:04

Arch LinuxLinuxCutefish 桌
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)