changed 3 years ago
Published Linked with GitHub

The tiling window manager

i3 WM


Outline

  • Linux 下的桌面環境
    • Desktop Environment
    • Display Manager
    • Window Manager
  • Tiling Window Manager
    • i3 WM
    • i3 WM Usage

Desktop Environment(DE)

  • 各種元件集合而成的環境
    • Topbar
    • Evince 、 Dophin 、 Game 等常用軟體
    • 視窗、圖示、滑鼠游標等外觀
    • 鎖定螢幕畫面
    • Display Manager
    • Window Manager

如果沒有桌面環境


KDE Plasma 5


KDE Plasma 5

  • 易客製化
  • 介面類似 Windows
  • 輕量(?
  • Steam Deck(SteamOS 3.0) 、 OpenSUSE 預設桌面環境

Gnome


Gnome

  • 可能需要 gnome-tweaks 等工具來客製化
  • 介面類似 macOS
  • Ubuntu 預設桌面環境

Xfce


Xfce

  • 輕量級桌面環境
  • 簡潔、穩定

載入桌面環境的幫手

Display Manager


是否對以下命令有印象?

$ sudo systemctl enable gdm     # for gnome
$ sudo systemctl enable sddm    # for plasma 

Display Manager

  • 引導登入的桌面環境以及使用者
  • 自動登入、指紋辨識、 ID 卡辨識……
  • 自定義登入介面的外觀(Themes)

GDM(Gnome Display Manager)


SDDM(Simple Desktop Display Manager)


LigthDM with Slick Greeter


更換要登入的桌面環境


Tiling Window Manager


Tiling Window Manager

  • 視窗之間不重疊
  • 不包含其他附屬程式(需要要什麼自己裝)
  • 最大化螢幕使用


i3-gaps


以 Manjaro i3 為例


左下角會有提示


基本操作 —— Open Terminal


開啟、關閉程式


切換 Layout


Layout(cont.)


Resize


全螢幕和彈出視窗控制


Config & Tips


Config file

~/.config/i3/config
~/.i3/config
/etc/i3/config

組合鍵綁定

# Set mod key (Mod1=<Alt>, Mod4=<Super>)
set $mod Mod1
bindsym $mod+Return exec kitty
bindsym $mod+Shift+q kill

進入桌面時自動啟動程式

# 僅一次
exec --no-startup-id ibus-daemon -drxR

# restart(mod+Shift+r) 也會生效
exec_always --no-startup-id picom -b
exec_always --no-startup-id ~/script.sh

Focus window 是否跟隨游標

focus_follows_mouse no

i3 + KDE Plasma


常用的輔助程式

  • Polybar 替換原本的 i3bar 提供高度客製化的外觀和功能
  • Rofi dmenu 的替代方案
  • picom 提供視窗諸如透明、陰影等特效
  • Polkit 工具 進行驗證時會需要(例如燒錄 LiveUSB 等操作)
  • feh 桌布工具
  • dunst Notification daemon
  • nm-applet NetworkManager 的 systray icon
  • arandr 管理螢幕顯示的 GUI 小工具

Wayland 方案

  • Sway 在 Wayland 下的 i3 替代方案,可以直接用原本的 i3config ,桌布、透明特效等皆可直接用 sway config 設定
  • Wofi Wayland native 的程式啟動器
  • Waybar Wayland native 的 topbar
  • mako Notification daemon for wayland
  • wdisplays 管理螢幕顯示

Select a repo