ArchLinux下i3wm简单配置和美化

ArchLinux下i3wm简单配置和美化先show下⾃⼰配置的截图,简单弄了下,凑合⽤。
1.安装显卡驱动和X窗系统
(1)安装显卡驱动
确定显卡型号
执⾏:
# lspci | grep VGA
执⾏:
$ sudo pacman -S 驱动包
官⽅仓库提供的驱动包:
通⽤----------------------------------xf86-video-vesa
intel----------------------------------xf86-video-intel
Geforce7±-------------------------xf86-video-nouveau
Geforce6/7-------------------------xf86-video-304xx
(2)安装X窗⼝系统
执⾏:
$ sudo  pacman -S xorg-server
3.安装登录管理器和i3wm
(1)安装sddm登录管理器,可以选择其他登录管理器或者不装⽤startx启动,具体参见arch wiki
执⾏
$ sudo pacman -S sddm
$ sudo systemctl enable sddm
安装并启⽤sddm服务
(2)安装i3wm
执⾏
$ sudo pacman -S i3-gaps
安装i3-gaps(i3-gaps为i3wm的分⽀,提供了更多特性)
(3)安装终端
执⾏
$ sudo pacman -S mate-terminal
安装mate-terminal(可选其他终端,这⾥安装的是mate桌⾯的终端,相⽐其他xterm urxvt等轻量级终端略为⼤⼀些,但是配置⽅便,⾃⼰⽤⿏标点⼏下就ok了)
(4)重启
reboot
⾄此基础的i3安装已经完成
4.开始安装简单美化所需的软件
软件名简介
compton提供窗⼝透明⽀持钢结构阻尼比
polybar状态条,类似于windows那个任务栏,也可以⽤默认的i3bar或者装别的panel
rofi快捷程序启动,也可以装dmenu
feh墙纸设置
(1)安装窗⼝透明⽀持软件
$ sudo pacman -S compton
(2)安装状态条
先添加archlinuxcn源, polybar在archlinuxcn源⾥。
$ sudo nano /f
在 /f ⽂件末尾添加两⾏:
[archlinuxcn]
SigLevel=Never
Server = mirrors.ustc.edu/archlinuxcn/$arch
(先执⾏sudo pacman -S firefox 安装浏览器,然后打开本⽂复制⼀下⽂中archlinuxcn源,在nano ⾥ctrl+shift+v粘贴以下)
然后执⾏
$ sudo pacman -Syy
更新下仓库信息
执⾏
$ sudo pacman -S polybar
安装polybar
(3)安装快捷程序启动
$ sudo pacman -S rofi
(4)安装墙纸设置软件
$ sudo pacman -S feh
其中执⾏
feh --randomize --bg-fill ~/Pictures/DesktopBackground
会随机切换⼀张图⽚作为墙纸,可以配合linux的crontab 设置成每隔10分钟⾃动切换壁纸。crontab的安装使⽤很简单,请⾃⾏百度。
(5)安装输⼊法
执⾏
$ sudo pacman -S fcitx-im fcitx-configtool
安装输⼊法引擎。
官⽅仓库⾥的输⼊法:
fcitx-cloudpinyin
fcitx-googlepinyin
fcitx-libpinyin
fcitx-sunpinyin
ArchLinuxCN源⾥有搜狗拼⾳ fcitx-sogoupinyin
选择⼀个安装.
执⾏
$ nano ~/.xprofile
添加以下内容
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS="@im=fcitx"
5.修改配置⽂件
(1)修改i3配置⽂件
公交站台执⾏
$ nano ~/.config/i3/config
打开配置⽂件。
汉字注释部分为在原来配置⽂件基础上修改添加的内容
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see /docs/userguide.html for a complete reference!
set $mod Mod4
#设置窗⼝边框等等
new_window none
new_float normal
hide_edge_borders both
pubmed数据库
#设置窗⼝间距
gaps inner 8
gaps outer 6
# 设置截图快捷键,先安装mate-utils, sudo pacman -S mate-utils
# 设置截图快捷键,先安装mate-utils, sudo pacman -S mate-utils
bindsym $mod+p  exec  mate-screenshot -i
#登录时启⽤窗⼝透明
exec --no-startup-id compton -b
#登陆时随机选择壁纸,~/Pictures/DesktopBackground 下要放⼏张图⽚
exec --no-startup-id feh --randomize --bg-fill ~/Pictures/DesktopBackground
# 登陆时启动polybar
exec --no-startup-id  ~/.config/polybar/launch.sh
#登录时启动fcitx
exec --no-startup-id fcitx
# 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 8
# 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 Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# start a terminal
bindsym $mod+Return exec i3-sensible-terminal
# kill focused window
bindsym $mod+Shift+q kill
#设置快捷程序启动为rofi
# start dmenu (a program launcher)
#bindsym $mod+d exec dmenu_run
# There also is the (new) 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
bindsym $mod+d exec --no-startup-id rofi -show drun
# change focus
bindsym $mod+j focus left
bindsym $mod+k focus down
bindsym $mod+l focus up
bindsym $mod+semicolon focus right
# alternatively, you can use the cursor keys:
bindsym $mod+Left focus left
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+j move left
bindsym $mod+Shift+k move down
bindsym $mod+Shift+l move up
bindsym $mod+Shift+semicolon 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
福利乐透型c735
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
# 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"bind9
set $ws8 "8"
set $ws9 "9"
set $ws10 "10"
# switch to workspace
bindsym $mod+1 workspace number $ws1
bindsym $mod+2 workspace number $ws2
bindsym $mod+3 workspace number $ws3
bindsym $mod+4 workspace number $ws4
bindsym $mod+5 workspace number $ws5
bindsym $mod+6 workspace number $ws6
bindsym $mod+7 workspace number $ws7
bindsym $mod+8 workspace number $ws8
bindsym $mod+9 workspace number $ws9

本文发布于:2024-09-21 20:52:34,感谢您对本站的认可!

本文链接:https://www.17tex.com/xueshu/692940.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:安装   设置   配置   软件   驱动   启动   登录   截图
留言与评论(共有 0 条评论)
   
验证码:
Copyright ©2019-2024 Comsenz Inc.Powered by © 易纺专利技术学习网 豫ICP备2022007602号 豫公网安备41160202000603 站长QQ:729038198 关于我们 投诉建议