Archlinux+matedesktop+i3wm

配置一套matedesktop + i3wm的桌面環(huán)境

1.概述

  • desktop:mate
  • window_manager:i3wm

2.安裝過程

2.1 必備的安裝包

sudo pacman -S xorg mate mate-extra lightdm-webkit2-greeter #直接下載greeter就行仇穗,不用自己去找lightdm

通過archlinux的wiki找到配置的具體實(shí)現(xiàn)

2.2 lightdm配置細(xì)節(jié)

根據(jù)archwiki的lightdm章節(jié)

配置/etc/lightdm/lightdm.conf

查看可用的greeter

$ ls -1 /usr/share/xgreeters/
lightdm-gtk-greeter.desktop
lightdm-webkit2-greeter.desktop

配置greeter

[Seat:*]
...
greeter-session=lightdm-yourgreeter-greeter
...
```c t l
登陸圖形檢查
- 可能圖形驅(qū)動(dòng)加載完之前就啟動(dòng)了lightdm,所以要check
```bash
[LightDM]
logind-check-graphical=true

開機(jī)自動(dòng)啟動(dòng)

systemctl enable lightdm.service

安裝network-manager-applet

sudo pacman -S network-manager-applet

systemctl enable NetworkManager.service

3.配置i3wm

將mate desktop的window_manager設(shè)置成i3wm

  • 根據(jù)archwiki的mate章節(jié)(English)

3.1 安裝i3wm

sudo pacman -S i3-wm

3.2 修改mate桌面的window_manager

注意使用gsettings時(shí)筝野,是否和python虛擬環(huán)境anaconda的gsettings相沖突

# 把桌面圖標(biāo)都隱藏
gsettings set org.mate.background show-desktop-icons false

# windowmanager設(shè)置為i3
gsettings set org.mate.session.required-components windowmanager i3

3.3 把顯示在i3bar的小圖標(biāo)都顯示在pannel

# ~/.config/i3/config
bar{
    tray_output none
    ...
    strip_workspace_numbers yes  # 設(shè)置工作區(qū)名字的時(shí)候可以讓名字里的數(shù)字省略
}

3.4 i3wm配置參考

# ~/.config/i3/config
# i3 config file (v4)
#
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
#
# This config file uses keycodes (bindsym) and was written for the QWERTY
# layout.
#
# To get a config file with the same key positions, but for your current
# layout, use the i3-config-wizard
#

# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
font pango:monospace 10


# This font is widely installed, provides lots of unicode glyphs, right-to-left
# text rendering and scalability on retina/hidpi displays (thanks to pango).
#font pango:DejaVu Sans Mono 8

# The combination of xss-lock, nm-applet and pactl is a popular choice, so
# they are included here as an example. Modify as you see fit.

# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the
# screen before suspend. Use loginctl lock-session to lock your screen.
# exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork

# NetworkManager is the most popular way to manage wireless networks on Linux,
# and nm-applet is a desktop environment-independent system tray GUI for it.
exec --no-startup-id nm-applet

# Use pactl to adjust volume in PulseAudio.
set $refresh_i3status killall -SIGUSR1 i3status
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status

# use these keys for focus, movement, and resize directions when reaching for
# the arrows is not convenient
set $up l
set $down k
set $left j
set $right semicolon

# mod
set $mod Mod4

# use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod

# start a terminal
#bindsym $mod+Return exec i3-sensible-terminal
bindsym $mod+Return exec mate-terminal

# kill focused window
bindsym $mod+Shift+q kill

## caja
#bindsym $mod+m exec caja

# start dmenu (a program launcher)
#bindsym $mod+d exec --no-startup-id dmenu_run
bindsym $mod+d exec --no-startup-id rofi -show run
# A more modern dmenu replacement is rofi:
# bindsym $mod+d exec "rofi -modi drun,run -show drun"
# There also is i3-dmenu-desktop which only displays applications shipping a
# .desktop file. It is a wrapper around dmenu, so you need that installed.
# bindsym $mod+d exec --no-startup-id i3-dmenu-desktop

# change focus
bindsym $mod+$left focus left
bindsym $mod+$down focus down
bindsym $mod+$up focus up
bindsym $mod+$right focus right

# alternatively, you can use the cursor keys:
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right

# move focused window
bindsym $mod+Shift+$left move left
bindsym $mod+Shift+$down move down
bindsym $mod+Shift+$up move up
bindsym $mod+Shift+$right move right

# alternatively, you can use the cursor keys:
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right

# split in horizontal orientation
bindsym $mod+h split h

# split in vertical orientation
bindsym $mod+v split v

# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen toggle

# change container layout (stacked, tabbed, toggle split)
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split

# toggle tiling / floating
bindsym $mod+Shift+space floating toggle

# change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle

# focus the parent container
bindsym $mod+a focus parent

# focus the child container
#bindsym $mod+d focus child

# move the currently focused window to the scratchpad
bindsym $mod+Shift+minus move scratchpad

# Show the next scratchpad window or hide the focused scratchpad window.
# If there are multiple scratchpad windows, this command cycles through them.
bindsym $mod+minus scratchpad show

# Define names for default workspaces for which we configure key bindings later on.
# We use variables to avoid repeating the names in multiple places.
set $ws1 "1:?"
set $ws2 "2:?"
set $ws3 "3:?"
set $ws4 "4:?"
set $ws5 "5"
set $ws6 "6"
set $ws7 "7"
set $ws8 "8"
set $ws9 "desk"
set $ws10 "10:?"

# switch to workspace
bindsym $mod+1 workspace $ws1
bindsym $mod+2 workspace $ws2
bindsym $mod+3 workspace $ws3
bindsym $mod+4 workspace $ws4
bindsym $mod+5 workspace $ws5
bindsym $mod+6 workspace $ws6
bindsym $mod+7 workspace $ws7
bindsym $mod+8 workspace $ws8
bindsym Mod1+1 workspace $ws9
bindsym $mod+0 workspace $ws10

# assign workspace for application
for_window [class="Chromium"] move container to workspace $ws2
for_window [class="firefox"] move container to workspace $ws2
for_window [class="Wine"] move container to workspace $ws3
for_window [class="yesplaymusic"] move container to workspace $ws10
for_window [class="Code"] move container to workspace $ws4

# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace $ws1
bindsym $mod+Shift+2 move container to workspace $ws2
bindsym $mod+Shift+3 move container to workspace $ws3
bindsym $mod+Shift+4 move container to workspace $ws4
bindsym $mod+Shift+5 move container to workspace $ws5
bindsym $mod+Shift+6 move container to workspace $ws6
bindsym $mod+Shift+7 move container to workspace $ws7
bindsym $mod+Shift+8 move container to workspace $ws8
bindsym $mod+Shift+9 move container to workspace $ws9
bindsym $mod+Shift+0 move container to workspace $ws10

# reload the configuration file
bindsym $mod+Shift+c reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+r restart
# exit i3 (logs you out of your X session)
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'"

# resize window (you can also use the mouse for that)
mode "resize" {
        # These bindings trigger as soon as you enter the resize mode

        # Pressing left will shrink the window’s width.
        # Pressing right will grow the window’s width.
        # Pressing up will shrink the window’s height.
        # Pressing down will grow the window’s height.
        bindsym $left       resize shrink width 10 px or 10 ppt
        bindsym $down       resize grow height 10 px or 10 ppt
        bindsym $up         resize shrink height 10 px or 10 ppt
        bindsym $right      resize grow width 10 px or 10 ppt

        # same bindings, but for the arrow keys
        bindsym Left        resize shrink width 10 px or 10 ppt
        bindsym Down        resize grow height 10 px or 10 ppt
        bindsym Up          resize shrink height 10 px or 10 ppt
        bindsym Right       resize grow width 10 px or 10 ppt

        # back to normal: Enter or Escape or $mod+r
        bindsym Return mode "default"
        bindsym Escape mode "default"
        bindsym $mod+r mode "default"
}

bindsym $mod+r mode "resize"

# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
bar {
        status_command i3blocks
        strip_workspace_numbers yes
        tray_output none
}

# picom
#exec --no-startup-id picom -b

#######################################################################
# automatically start i3-config-wizard to offer the user to create a
# keysym-based config which used their favorite modifier (alt or windows)
#
# i3-config-wizard will not launch if there already is a config file
# in ~/.config/i3/config (or $XDG_CONFIG_HOME/i3/config if set) or
# ~/.i3/config.
#
# Please remove the following exec line:
#######################################################################
# exec i3-config-wizard

4.補(bǔ)充離線情況安裝Archlinux

  • 準(zhǔn)備好必須的安裝包
  • repo-add到自己的倉庫
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末嗅钻,一起剝皮案震驚了整個(gè)濱河市昭灵,隨后出現(xiàn)的幾起案子,更是在濱河造成了極大的恐慌硬萍,老刑警劉巖扩所,帶你破解...
    沈念sama閱讀 217,277評論 6 503
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件,死亡現(xiàn)場離奇詭異朴乖,居然都是意外死亡祖屏,警方通過查閱死者的電腦和手機(jī),發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 92,689評論 3 393
  • 文/潘曉璐 我一進(jìn)店門买羞,熙熙樓的掌柜王于貴愁眉苦臉地迎上來袁勺,“玉大人,你說我怎么就攤上這事畜普∑诜幔” “怎么了?”我有些...
    開封第一講書人閱讀 163,624評論 0 353
  • 文/不壞的土叔 我叫張陵吃挑,是天一觀的道長钝荡。 經(jīng)常有香客問我,道長舶衬,這世上最難降的妖魔是什么埠通? 我笑而不...
    開封第一講書人閱讀 58,356評論 1 293
  • 正文 為了忘掉前任,我火速辦了婚禮逛犹,結(jié)果婚禮上端辱,老公的妹妹穿的比我還像新娘梁剔。我一直安慰自己,他們只是感情好舞蔽,可當(dāng)我...
    茶點(diǎn)故事閱讀 67,402評論 6 392
  • 文/花漫 我一把揭開白布荣病。 她就那樣靜靜地躺著,像睡著了一般渗柿。 火紅的嫁衣襯著肌膚如雪个盆。 梳的紋絲不亂的頭發(fā)上,一...
    開封第一講書人閱讀 51,292評論 1 301
  • 那天朵栖,我揣著相機(jī)與錄音砾省,去河邊找鬼。 笑死混槐,一個(gè)胖子當(dāng)著我的面吹牛,可吹牛的內(nèi)容都是我干的轩性。 我是一名探鬼主播声登,決...
    沈念sama閱讀 40,135評論 3 418
  • 文/蒼蘭香墨 我猛地睜開眼,長吁一口氣:“原來是場噩夢啊……” “哼揣苏!你這毒婦竟也來了悯嗓?” 一聲冷哼從身側(cè)響起,我...
    開封第一講書人閱讀 38,992評論 0 275
  • 序言:老撾萬榮一對情侶失蹤卸察,失蹤者是張志新(化名)和其女友劉穎脯厨,沒想到半個(gè)月后,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體坑质,經(jīng)...
    沈念sama閱讀 45,429評論 1 314
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡合武,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 37,636評論 3 334
  • 正文 我和宋清朗相戀三年,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了涡扼。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片稼跳。...
    茶點(diǎn)故事閱讀 39,785評論 1 348
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡,死狀恐怖吃沪,靈堂內(nèi)的尸體忽然破棺而出汤善,到底是詐尸還是另有隱情,我是刑警寧澤票彪,帶...
    沈念sama閱讀 35,492評論 5 345
  • 正文 年R本政府宣布红淡,位于F島的核電站,受9級特大地震影響降铸,放射性物質(zhì)發(fā)生泄漏在旱。R本人自食惡果不足惜,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 41,092評論 3 328
  • 文/蒙蒙 一垮耳、第九天 我趴在偏房一處隱蔽的房頂上張望颈渊。 院中可真熱鬧遂黍,春花似錦、人聲如沸俊嗽。這莊子的主人今日做“春日...
    開封第一講書人閱讀 31,723評論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽绍豁。三九已至芯咧,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間竹揍,已是汗流浹背敬飒。 一陣腳步聲響...
    開封第一講書人閱讀 32,858評論 1 269
  • 我被黑心中介騙來泰國打工, 沒想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留芬位,地道東北人无拗。 一個(gè)月前我還...
    沈念sama閱讀 47,891評論 2 370
  • 正文 我出身青樓,卻偏偏與公主長得像昧碉,于是被迫代替她去往敵國和親英染。 傳聞我的和親對象是個(gè)殘疾皇子,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 44,713評論 2 354

推薦閱讀更多精彩內(nèi)容