侧边栏壁纸
博主头像
v林羽博主等级

行动起来,活在当下

  • 累计撰写 171 篇文章
  • 累计创建 34 个标签
  • 累计收到 12 条评论

目 录CONTENT

文章目录

【Linux使用】之--Arch部分软件程序使用指南

v林羽
2022-09-11 / 0 评论 / 0 点赞 / 656 阅读 / 12682 字 / 正在检测是否收录...
温馨提示:
本文最后更新于 2023-11-01,若内容或图片失效,请留言反馈。部分素材来自网络,若不小心影响到您的利益,请联系我们删除。

【Linux使用】之–Arch部分软件程序使用指南

#Linux #教程 #工具 #系统 #Ubuntu #arch #archlinux

软件一体安装

# 一体安装
yay -S pulseaudio-alsa pulseaudio-bluetooth net-tools openssh vim git wget man google-chrome microsoft-edge-stable-bin ntfs-3g unzip unrar flameshot timeshift plasma konsole dolphin plasma5-applets-netspeed ksysguard plasma5-applets-weather-widget-2 qt5-xmlpatterns latte-dock kate ark gwenview kcalc ktimer kamoso wps-office wps-office-mui-zh-cn ttf-wps-fonts visual-studio-code-bin telegram-desktop yesplaymusic deadbeef

# 软件说明
pulseaudio-alsa # 声音相关
pulseaudio-bluetooth # 蓝牙耳机
net-tools # 网络管理工具
openssh # ssh工具
vim git wget man # 一些常用工具
google-chrome # 浏览器
microsoft-edge-stable-bin # 浏览器
ntfs-3g # ntfs格式读取
unzip unrar # 解压软件
flameshot # 截图工具-火焰截图
timeshift # 备份工具
--- # KDE组件
plasma # KDE桌面  
konsole # KDE桌面终端  
dolphin # KDE桌面文件管理器
plasma5-applets-netspeed ksysguard # 插件网速
plasma5-applets-weather-widget-2 qt5-xmlpatterns # 天气插件
latte-dock # KDE的dock栏插件
kate # 文本编辑器
ark # 解压缩工具
gwenview # 图片查看工具
kcalc # 科学计算器
ktimer # 倒计时执行器
kamoso # 相机
--- # office办公软件wps
wps-office wps-office-mui-zh-cn ttf-wps-fonts
---
visual-studio-code-bin  # vscode
telegram-desktop # TG
yesplaymusic # 网易云第三方播放器
deadbeef # 本地音乐播放器foobar2000

安装fcitx5输入法

yay -S fcitx5-im fcitx5-chinese-addons fcitx5-pinyin-moegirl fcitx5-pinyin-zhwiki fcitx5-material-color 

编辑运行环境,启用fcitx5

EDITOR=nano sudoedit /etc/environment

添加如下内容

GTK_IM_MODULE=fcitx
QT_IM_MODULE=fcitx
XMODIFIERS=@im=fcitx
SDL_IM_MODULE=fcitx

clash for windows

yay -S clash-for-windows-bin
EDITOR=nano sudoedit /etc/environment
ALL_PROXY=socks5://127.0.0.1:7899/
http_proxy=http://127.0.0.1:7899/
https_proxy=http://127.0.0.1:7899/
ftp_proxy=http://127.0.0.1:7899/
HTTP_PROXY=http://127.0.0.1:7899/
HTTPS_PROXY=http://127.0.0.1:7899/
FTP_PROXY=http://127.0.0.1:7899/

onedrive + obsidian

yay -S onedrive-abraunegg onedrivegui-git obsidian

鼠标按键修改Xbindkeys

Xbindkeys - ArchWiki

yay -S xorg-xmodmap xorg-xev xautomation xbindkeys

配置文件

nano ~/.xbindkeysrc
"xte 'keydown Control_L' 'key w' 'keyup Control_L'"
b:8

"xte 'keydown Control_L' 'keydown Shift_L' 'key t' 'keyup Shift_L' 'keyup Control_L'"
b:9

"xte 'keydown Control_L' 'keydown Shift_L' 'key o' 'keyup Shift_L' 'keyup Control_L'"
b:6

"xte 'keydown Control_L' 'keydown Shift_L' 'key p' 'keyup Shift_L' 'keyup Control_L'"
b:7

鼠标快速滚轮滑动

sudo pacman -S imwheel

配置文件

nano ~/.imwheelrc
".*"
None,      Up,   Button4, 4
None,      Down, Button5, 4
Control_L, Up,   Control_L|Button4
Control_L, Down, Control_L|Button5
Shift_L,   Up,   Shift_L|Button4
Shift_L,   Down, Shift_L|Button5

运行测试一下

imwheel

重新运行

imwheel kill

看到提示就成功了。

添加到启动项避免每次开机都要手动运行,这里可以用Gnome Tweak Tool来添加,不过我最近发现了systemd可以支持用户级服务,并且通过Arch Wiki了解到了具体的用法。

使用systemd用户级服务

创建~/.config/systemd/user/imwheel.service文件。

编辑内容

[Unit]
Description=IMWheel
Wants=display-manager.service
After=display-manager.service

[Service]
Type=simple
Environment=XAUTHORITY=%h/.Xauthority
ExecStart=/usr/bin/imwheel -d
ExecStop=/usr/bin/pkill imwheel
RemainAfterExit=yes

[Install]
WantedBy=graphical.target

使用以下命令启用服务:

 systemctl --user daemon-reload
 systemctl --user enable --now imwheel
 journalctl --user --unit imwheel

鼠标中键滚动页面

一般图形界面环境会依赖此包,不需要额外安装

sudo pacman -S libinput

libinput (简体中文) - ArchWiki

通过配置,在按住某个鼠标按键的同时移动鼠标,可以实现滚动页面的动作,这里以中键为例

创建/etc/X11/xorg.conf.d/00-mouse.conf文件

sudo vim /etc/X11/xorg.conf.d/00-mouse.conf

配置

Section "InputClass"
    Identifier "system-mouse"
    MatchIsPointer "on"
    Option "ScrollMethod" "button"
    Option "ScrollButton" "2"
EndSection

rdesktop远程桌面工具

连接

rdesktop IP:端口 -u root -p 密码 -x lan -g workarea -r clipboard:PRIMARYCLIPBOARD -r disk:my_share=/media/vda/

后台运行可使用nohup

nohup rdesktop IP:端口 -u root -p 密码 -x lan -g workarea -r clipboard:PRIMARYCLIPBOARD -r disk:my_share=/media/vda/ &

连接常用命令说明:

  • -u user:用户名
  • -p passwd: 登录密码,可选
  • -x l(lan)|modem:用来决定网络带宽,如果带宽宽的话,选择lan,则可以将桌面背景也传过来,默认是没有桌面背景的
  • -r clipboard:PRIMARYCLIPBOARD: 重要,剪贴板可以与远程桌面交互
  • -r disk:share_name=/data: 将本地磁盘映射到远程电脑,其中share_name为显示名称,可自定义,local-disk表示本地linux的一个目录,比如 /data
  • -r sound:off: 关闭声音,当然也可以把远程发的声音映射到本地来。
  • -d domain:指定域,可选
  • -g 1024x768: 指定分辨率,可选,-g workarea 自适应
  • -T tittle: 窗口标题
  • -D: 不显示窗口标题栏(只有远程桌面窗口,没有关闭和最小化按钮)
  • -f: 全屏模式(Ctrl + Alt + Enter 退出全屏模式)
  • -5: use RDP version 5

终端美化zsh

方案一

安装zsh
  1. 通过以下命令安装 zsh 相关的包:
sudo pacman -S zsh zsh-autosuggestions zsh-syntax-highlighting zsh-completions
  1. 安装 autojump插件:
sudo pacman -S autojump
  1. 更改账户的默认 Shell:
chsh -l # 查看安装了哪些 Shell
chsh -s /usr/bin/zsh # 修改当前账户的默认 Shell
  1. 注销并重新登录 > 打开终端,此时会弹出如下界面进行设置:
  • 按下 0 将创建一个只包含注释的 ~/.zshrc 文件,在下次启动时不会再次弹出设置选项。
  • 按下 1 即可进入设置

根据提示完成设置即可。也可以创建一个只包含注释的 ~/.zshrc 文件以使用默认值。

  1. 为了让插件生效,需要修改 ~/.zshrc。使用 vim 编辑 ~/.zshrc 文件:
vim ~/.zshrc

将以下内容分别添加到需要设置 zsh 账户的 ~/.zshrc 中:

source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
source /usr/share/autojump/autojump.zsh
  1. 关闭并重新打开终端,测试一下

有关 autojump 的使用可以参阅 autojump repo

可能需要:

  • 将在 ~/.bash_profile 所做的配置复制到 ~/.zsh_profile
  • 将在 ~/.bashrc 所做的配置复制到 ~/.zshrc
美化zsh
  1. 安装 zim
curl -fsSL https://raw.githubusercontent.com/zimfw/install/master/install.zsh | zsh
  1. 编辑 Zsh 配置文件 ~/.zimrc
vim ~/.zimrc
  1. 在文件最后加入下面的一行文字,以添加 powerlevel10k 模块,然后退出。
zmodule romkatv/powerlevel10k
  1. 安装 powerlevel10k 模块,在终端输入如下命令即可。
zimfw install

安装之后,powerlevel10k会让你进行配置。

在此时配置时,很多图标符号看不到,因为 powerlevel10k 中包含许多特殊图标符号,需要与之兼容的字体。

  1. 安装 Nerd Font 字体

Nerd Fonts 是一系列打过补丁的字体,支持 powerlevel10k 中的图标。

AUR 和 ArchLinuxCN 源中都有很多 Nerd Font,在终端使用 yay 搜索安装即可。

yay -Ss nerd-font

个人推荐使用nerd-fonts-jetbrains-mono字体,可在aur中安装

yay -S nerd-fonts-jetbrains-mono

安装完任意一个 Nerd Font 字体后,打开 Konsole 的 设置 > 编辑当前方案 > 外观,把 字体 改为刚刚安装的 Nerd Font 即可。

现在再打开 powerlevel10k 配置(p10k configure),就可以看到图标符号,正常配置了。

方案二

# 先安装包
yay -S zsh oh-my-zsh-git zsh-theme-powerlevel10k

# 按照提示拷贝配置文件
cp /usr/share/oh-my-zsh/zshrc ~/.zshrc

echo 'source /usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme' >>~/.zshrc
git clone https://gitee.com/keyboardkiller/nerd-fonts.git

# 复制字体
sudo mv -f ./nerd-fonts/patched-fonts/ /usr/share/fonts

# 刷新字体缓存
fc-cache -fv

# 更改shell
chsh -s /bin/zsh

# 配置shell
p10k configure
插件
# 历史命理补全
sudo git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

# 正确命令高亮
sudo git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

# calc计算器
# 用法 https://github.com/arzzen/calc.plugin.zsh
sudo git clone https://github.com/arzzen/calc.plugin.zsh.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/calc

# man命令着色,作用不大
# 用法 https://github.com/ael-code/zsh-colored-man-pages
sudo git clone https://github.com/ael-code/zsh-colored-man-pages.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/colored-man-pages

# 输出着色,不知道怎么用
# 用法 https://github.com/zpm-zsh/colorize
sudo sudo git clone https://github.com/zpm-zsh/colorize.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/colorize

启用插件

vim .zshrc

# 添加插件
plugins=(git zsh-autosuggestions zsh-syntax-highlighting calc)

# 启用配置
source .zshrc

虚拟机vmware-workstation

yay -S vmware-workstation
ZF3R0-FHED2-M80TY-8QYGC-NPKYF
YF390-0HF8P-M81RQ-2DXQE-M2UT6
ZF71R-DMX85-08DQY-8YMNC-PPHV8

启动网络服务

systemctl enable vmware-networks.service
systemctl start vmware-networks.service
0

评论区