官网下载过于缓慢,个人推荐一个稍微快一些的站点:http://bike.seedhost.eu/arcolinux/iso/
在 windows 上使用 rufus 工具,以 dd镜像 方式写入优盘。
在 linux 上直接用 dd 指令写入即可。
插上优盘,进入 BIOS 设置从优盘启动。进入系统后,他会自动打开 Welcome 界面。
重启后进入字符界面,用你自己创建的用户和密码登录。
/* 备份配置文件 */
sudo mv /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak
/* 编辑 */
sudo vim /etc/pacman.d/mirrorlist
/* 添加如下清华 arch 源 */
Server = http://mirror.tuna.tsinghua.edu.cn/archlinux/$repo/os/$arch
/* 配置 archlinuxcn 源 */
sudo vim /etc/pacman.conf
/* 在文件尾部添加 */
[archlinuxcn]
Server = https://mirrors.tuna.tsinghua.edu.cn/archlinuxcn/$arch
/* 刷新源 */
sudo pacman -Syy
/* 更新 */
sudo pacman -Syyu
用如下命令确保你的系统里安装了如下软件:
/* 输入完命令不要回车,连按两次 Tab 键 */
[wlb@Arco ~]$ sudo pacman -Rs arcolinux
arcolinux-betterlockscreen-git arcolinux-dwm-slstatus-git arcolinux-local-xfce4-git arcolinux-root-git
arcolinux-config-dwm-git arcolinux-grub-theme-vimix-git arcolinux-logout-git arcolinux-tweak-tool-git
arcolinuxd-system-config-git arcolinux-keyring arcolinux-mirrorlist-git arcolinux-wallpapers-git
arcolinux-dwm-dconf-git arcolinux-lightdm-gtk-greeter arcolinux-mirrorlist-spinoff-git arcolinux-welcome-app-git
arcolinux-dwm-git arcolinux-lightdm-gtk-greeter-settings arcolinux-neofetch-git arcolinux-xfce-git
如果有漏的(安装时网络有问题,有些包无法安装)要安装好,例如:
sudo pacman -S arcolinux-betterlockscreen-git
下面我们 enable lightdm:
sudo systemctl enable lightdm.service
确认配置文件存在:
[wlb@Arco ~]$ ls /etc/skel -al
total 76
drwxr-xr-x 4 root root 4096 1月 30 16:54 .
drwxr-xr-x 72 root root 4096 1月 31 15:27 ..
-rw-r--r-- 1 root root 21 12月 21 02:44 .bash_logout
-rw-r--r-- 1 root root 57 12月 21 02:44 .bash_profile
-rw-r--r-- 1 root root 7079 1月 18 16:59 .bashrc
drwxr-xr-x 17 root root 4096 1月 30 16:55 .config
-rw-r--r-- 1 root root 6998 1月 18 16:59 .conkyrc
-rw-r--r-- 1 root root 23 1月 18 16:59 .dmrc
-rw-r--r-- 1 root root 1663 1月 18 16:59 .face
-rw-r--r-- 1 root root 553 1月 18 16:59 .gtkrc-2.0
drwxr-xr-x 3 root root 4096 1月 30 16:52 .local
-rw-r--r-- 1 root root 3729 8月 30 17:55 .screenrc
-rw-r--r-- 1 root root 214 1月 18 16:59 .xinitrc
-rw-r--r-- 1 root root 5480 1月 18 16:59 .Xresources
-rw-r--r-- 1 root root 63 1月 18 16:59 .xsession
-rw-r--r-- 1 root root 516 1月 18 16:59 .xsessionrc
使用专门的命令复制配置文件:
alias skel
使用专门的命令重启系统:
sr
此时应该就可以到登录界面了,登录进去会发现很丑,功能也可能不完善(同样是因为安装是网络有问题,只需手动安装那些软件即可,按 CTRL+ALT+F2进入字符界面,dwm 需要以下软件包):
sudo pacman -S sxhkd
sudo pacman -S dmenu
sudo pacman -S feh
sudo pacman -S picom
sudo pacman -S gmrun
sudo pacman -S xfce4-taskmanager
sudo pacman -S xfce4-screenshooter
sudo pacman -S xfce4-notifyd
sudo pacman -S xfce4-power-manager
sudo pacman -S xfce4-terminal
sudo pacman -S xfce4-settings
sudo pacman -S gsimplecal
sudo pacman -S thunar
sudo pacman -S thunar-archive-plugin
sudo pacman -S thunar-volman
sudo pacman -S volumeicon
reboot
再次进入系统,默认按 Win + p 键启动 dmanu,输入 termite,回车打开终端。就可以自由的进行配置了,我这里介绍 arco-dwm 和 arco-slstatus 的配置.
复制源码到 ~/.config 文件夹下:
cp -r /etc/skel/.config/arco-dwm ~/.config
cp -r /etc/skel/.config/arco-slstatus ~/.config
打开 arco-dwm/autostart.sh 并配置:
#!/bin/bash
function run {
if ! pgrep $1 ;
then
$@&
fi
}
#run "dex $HOME/.config/autostart/arcolinux-welcome-app.desktop"
#run "xrandr --output VGA-1 --primary --mode 1360x768 --pos 0x0 --rotate normal"
#run "xrandr --output HDMI2 --mode 1920x1080 --pos 1920x0 --rotate normal --output HDMI1 --primary --mode 1920x1080 --pos 0x0 --rotate normal --output VIRTUAL1 --off"
#run xrandr --output eDP-1 --primary --mode 1368x768 --pos 0x0 --rotate normal --output DP-1 --off --output HDMI-1 --off --output DP-2 --off --output HDMI-2 --off
#run xrandr --output LVDS1 --mode 1366x768 --output DP3 --mode 1920x1080 --right-of LVDS1
#run xrandr --output DVI-I-0 --right-of HDMI-0 --auto
#run xrandr --output DVI-1 --right-of DVI-0 --auto
#run xrandr --output DVI-D-1 --right-of DVI-I-1 --auto
#run xrandr --output HDMI2 --right-of HDMI1 --auto
run "sh /home/wlb/.screenlayout/displaysetting.sh" #这个脚本是用 arandr 工具生成的,用于配置多屏幕及分辨率
run "nm-applet"
run "pamac-tray"
run "variety"
run "xfce4-power-manager"
run "blueberry-tray"
run "/usr/lib/xfce4/notifyd/xfce4-notifyd"
run "/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1"
picom -b --config ~/.config/arco-dwm/picom.conf &
run "numlockx on"
run "volumeicon"
run slstatus &
sxhkd -c ~/.config/arco-dwm/sxhkd/sxhkdrc &
#run "nitrogen --restore"
run "conky -c $HOME/.config/arco-dwm/system-overview"
#you can set wallpapers in themes as well
#run applications from startup
#run "insync start"
#run "spotify"
#run "ckb-next -b"
#run "discord"
#run "telegram-desktop"
run "fcitx" #安装完中文输入法需要设置 fcitx 自启动
feh --bg-fill --no-fehbg --randomize /home/wlb/Pictures/background & #设置桌面壁纸,需要将多张图片放到指定文件夹中,开机时会自动随机选择
还有 arco-dwm/config.h 和 arco-dwm/config.def.h,我将这两个文件保持一致:
/* See LICENSE file for copyright and license details. */
/* appearance */
static const unsigned int borderpx = 1; /* border pixel of windows */
static const unsigned int gappx = 5; /* gaps between windows */
static const unsigned int snap = 32; /* snap pixel */
static const unsigned int systraypinning = 0; /* 0: sloppy systray follows selected monitor, >0: pin systray to monitor X */
static const unsigned int systrayspacing = 2; /* systray spacing */
static const int systraypinningfailfirst = 1; /* 1: if pinning fails, display systray on the first monitor, False: display systray on the last monitor*/
static const int showsystray = 1; /* 0 means no systray */
static const int showbar = 1; /* 0 means no bar */
static const int topbar = 0; /* 0 means bottom bar */
static const Bool viewontag = True; /* Switch view on tag switch */
static const char *fonts[] = { "Noto Sans Mono:size=11" };
static const char dmenufont[] = "monospace:size=10";
static const char col_gray1[] = "#222222";
static const char col_gray2[] = "#444444";
static const char col_gray3[] = "#bbbbbb";
static const char col_gray4[] = "#eeeeee";
static const char col_cyan[] = "#6790EB";
static const unsigned int baralpha = 0xd0;
static const unsigned int borderalpha = OPAQUE;
static const char *colors[][3] = {
/* fg bg border */
[SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
[SchemeSel] = { col_gray4, col_cyan, col_cyan },
};
static const unsigned int alphas[][3] = {
/* fg bg border */
[SchemeNorm] = { OPAQUE, baralpha, borderalpha },
[SchemeSel] = { OPAQUE, baralpha, borderalpha },
};
/* tagging */
static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
/* static const char *tags[] = { "I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX" }; */
/* static const char *tags[] = { "", "", "", "", "", "", "", "", "" }; */
/* static const char *tags[] = { "Web", "Chat", "Edit", "Meld", "Vb", "Mail", "Video", "Image", "Files" }; */
static const Rule rules[] = {
/* xprop(1):
* WM_CLASS(STRING) = instance, class
* WM_NAME(STRING) = title
* use tags mask to point an application to a specific workspace
*/
/* class instance title tags mask isfloating monitor */
{ "Gimp", NULL, NULL, 0, 0, -1 },
{ "Xfce4-terminal", NULL, NULL, 0, 1, -1 },
{ "firefox", NULL, NULL, 0, 0, -1 },
{ "Arcolinux-welcome-app.py", NULL, NULL, 0, 1, -1 },
};
/* layout(s) */
static const float mfact = 0.50; /* factor of master area size [0.05..0.95] */
static const int nmaster = 1; /* number of clients in master area */
static const int resizehints = 1; /* 1 means respect size hints in tiled resizals */
#include "layouts.c"
static const Layout layouts[] = {
/* symbol arrange function */
{ "[]=", tile }, /* first entry is default */
{ "HHH", grid },
{ "[M]", monocle },
{ "><>", NULL }, /* no layout function means floating behavior */
{ NULL, NULL },
};
/* key definitions */
#define MODKEY Mod4Mask
#define TAGKEYS(KEY,TAG) \
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
{ MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} },
/* helper for spawning shell commands in the pre dwm-5.0 fashion */
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
/* commands */
static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
static const char *filecmd[] = { "thunar", NULL };
static const char *calendar[] = { "gsimplecal", NULL };
static const char *taskmanager[] = { "xfce4-taskmanager", NULL };
static const char *terminal[] = { "termite", NULL };
static const char *chrome[] = { "google-chrome-stable", NULL };
#include "selfrestart.c"
#include "shiftview.c"
static Key keys[] = {
/* modifier key function argument */
{ MODKEY, XK_p, spawn, {.v = dmenucmd } },
{ MODKEY|ShiftMask, XK_Return, spawn, {.v = filecmd } },
{ MODKEY, XK_b, togglebar, {0} },
{ MODKEY, XK_j, focusstack, {.i = +1 } },
{ MODKEY, XK_k, focusstack, {.i = -1 } },
{ MODKEY, XK_Right, focusstack, {.i = +1 } },
{ MODKEY, XK_Left, focusstack, {.i = -1 } },
{ MODKEY, XK_i, incnmaster, {.i = +1 } },
{ MODKEY, XK_d, incnmaster, {.i = -1 } },
{ MODKEY, XK_h, setmfact, {.f = -0.05} },
{ MODKEY, XK_l, setmfact, {.f = +0.05} },
{ MODKEY, XK_minus, setgaps, {.i = -1 } },
{ MODKEY, XK_equal, setgaps, {.i = +1 } },
{ MODKEY|ShiftMask, XK_equal, setgaps, {.i = 0 } },
{ MODKEY, XK_Return, spawn, {.v = terminal} },
{ MODKEY, XK_F1, spawn, {.v = chrome} },
/*{ MODKEY, XK_Return, zoom, {0} },*/
/*{ MODKEY, XK_Tab, view, {0} },*/
{ MODKEY|ShiftMask, XK_q, killclient, {0} },
{ MODKEY, XK_q, killclient, {0} },
{ MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
{ MODKEY, XK_g, setlayout, {.v = &layouts[1]} },
{ MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
{ MODKEY, XK_f, setlayout, {.v = &layouts[2]} },
{ MODKEY|ControlMask, XK_comma, cyclelayout, {.i = -1 } },
{ MODKEY|ControlMask, XK_period, cyclelayout, {.i = +1 } },
{ MODKEY, XK_space, cyclelayout, {.i = +1 } },
{ MODKEY|ShiftMask, XK_space, togglefloating, {0} },
{ MODKEY, XK_0, view, {.ui = ~0 } },
{ MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
{ MODKEY, XK_comma, focusmon, {.i = -1 } },
{ MODKEY, XK_period, focusmon, {.i = +1 } },
{ MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
{ MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
{ MODKEY|ShiftMask, XK_r, self_restart, {0} },
{ Mod1Mask|ControlMask, XK_Right, shiftview, {.i = 1 } },
{ Mod1Mask|ControlMask, XK_Left, shiftview, {.i = -1 } },
{ Mod1Mask|ControlMask, XK_Up, shiftview, {.i = 1 } },
{ Mod1Mask|ControlMask, XK_Down, shiftview, {.i = -1 } },
{ Mod1Mask, XK_Tab, shiftview, {.i = 1 } },
{ Mod1Mask|ShiftMask, XK_Tab, shiftview, {.i = -1 } },
{ MODKEY, XK_Tab, shiftview, {.i = 1 } },
{ MODKEY|ShiftMask, XK_Tab, shiftview, {.i = -1 } },
TAGKEYS( XK_1, 0)
TAGKEYS( XK_2, 1)
TAGKEYS( XK_3, 2)
TAGKEYS( XK_4, 3)
TAGKEYS( XK_5, 4)
TAGKEYS( XK_6, 5)
TAGKEYS( XK_7, 6)
TAGKEYS( XK_8, 7)
TAGKEYS( XK_9, 8)
};
/* IF YOU HAVE A AZERTY KEYBOARD USE THESE CODES
TAGKEYS( XK_ampersand, 0)
TAGKEYS( XK_eacute, 1)
TAGKEYS( XK_quotedbl, 2)
TAGKEYS( XK_apostrophe, 3)
TAGKEYS( XK_parenleft, 4)
TAGKEYS( XK_section, 5)
TAGKEYS( XK_egrave, 6)
TAGKEYS( XK_exclam, 7)
TAGKEYS( XK_ccedilla, 8)
*/
/* THESE ARE THE ORIGINAL QWERTY KEYBOARD CODES
TAGKEYS( XK_1, 0)
TAGKEYS( XK_2, 1)
TAGKEYS( XK_3, 2)
TAGKEYS( XK_4, 3)
TAGKEYS( XK_5, 4)
TAGKEYS( XK_6, 5)
TAGKEYS( XK_7, 6)
TAGKEYS( XK_8, 7)
TAGKEYS( XK_9, 8)
*/
/* button definitions */
/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
static Button buttons[] = {
/* click event mask button function argument */
{ ClkLtSymbol, 0, Button1, setlayout, {0} },
{ ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} },
{ ClkWinTitle, 0, Button2, zoom, {0} },
{ ClkStatusText, 0, Button1, spawn, {.v = taskmanager } },
{ ClkStatusText, 0, Button2, spawn, {.v = filecmd } },
{ ClkStatusText, 0, Button3, spawn, {.v = calendar } },
{ ClkClientWin, MODKEY, Button1, movemouse, {0} },
{ ClkClientWin, MODKEY, Button2, togglefloating, {0} },
{ ClkClientWin, MODKEY, Button3, resizemouse, {0} },
{ ClkTagBar, 0, Button1, view, {0} },
{ ClkTagBar, 0, Button3, toggleview, {0} },
{ ClkTagBar, MODKEY, Button1, tag, {0} },
{ ClkTagBar, MODKEY, Button3, toggletag, {0} },
};
编译安装:
make
make install
打开 arco-slstatus/config.h 和 arco-slstatus/config.def.h 并修改一下内容,同样保持一致:
static const struct arg args[] = {
/* function format argument */
{ cpu_perc, "[CPU %s%%]", NULL},
{ ram_perc, "[RAM %s%%]", NULL},
{ disk_free, "[hdd %sB]","/"},
{ battery_perc, "[BAT %s%%]", "BAT0"},
/* { battery_state, " %s%%]", "BAT0"}, */
{ datetime, "%s","%a %b %d %R" }
};
编译安装:
make
make install
重启:
reboot
成品: