licoded / self-study-drafts

buffer for records
0 stars 0 forks source link

ArcoLinux+dwm #22

Open licoded opened 2 years ago

licoded commented 2 years ago

用VirtualBox安装虚拟机

安装后配置

Virtualbox guest增强软件

Virtualbox虚拟机Linux Guest的Additions安装方法

安装提示已经装了,让先卸载再装 卸载安装后,发现分辨率不正常了,又安装一遍(没卸载)重启两次好了

换源更新

基于 Arch Linux 的 arcolinux 安装与配置

输入法

按这个教程来,Archlinux安装搜狗拼音输入法 结果报错 download url 错误,拉取git仓库(地址),修改后使用这个方法重新编译安装,arch下PKGBUILD包的安装

因为不会修改默认浏览器(尝试了几个方法在i3上都不行),把Firefox浏览器删除了,结果输入法也没了 后来感觉卸载重装了所有fcitx软件并重启两次才OK 感觉也有可能是i3开机启动项没设置好的问题(fcitx-autostart需要设置为开机自启)

软件

screenshot

Linux中功能强大的截图工具 - Flameshot

Programming Tools

NVM Mirrors

export NVM_NODEJS_ORG_MIRROR=http://npm.taobao.org/mirrors/node
licoded commented 2 years ago

GitHub

  1. Generate ssh key pairs for accounts(ssh-keygen -t ed25519 -C "busy.li@foxmail.com")
  2. add them to GitHub accounts.
  3. Edit/Create ssh config file (~/.ssh/config):
    # Default github account: oanhnn
    Host github.com
       HostName github.com
       IdentityFile ~/.ssh/private_key
       IdentitiesOnly yes
  4. Test your connection
    ssh -T git@github.com
licoded commented 2 years ago

Terminal

licoded commented 2 years ago

Autostart

licoded commented 2 years ago

Git

Git Alias

git config --global alias.co checkout
git config --global alias.br branch
git config --global alias.ci commit
git config --global alias.st status

Editor

Viewing all git diffs with vimdiff How do I make git use the editor of my choice for commits?

git config --global core.editor "vim"

Set Remote

➜  .config git:(release/awesome) ✗ git push
fatal: No configured push destination.
Either specify the URL from the command-line or configure a remote repository using

    git remote add <name> <url>

and then push using the remote name

    git push <name>

➜  .config git:(release/awesome) ✗ git remote add origin https://github.com/licoded/arcolinux-config
➜  .config git:(release/awesome) ✗ git remote add origin git@github.com:licoded/arcolinux-config.git
➜  .config git:(release/awesome) ✗ git push
fatal: The current branch release/awesome has no upstream branch.
To push the current branch and set the remote as upstream, use

    git push --set-upstream origin release/awesome

➜  .config git:(release/awesome) ✗ git push --set-upstream origin release/awesome
Enumerating objects: 365, done.
Counting objects: 100% (365/365), done.
Delta compression using up to 4 threads
Compressing objects: 100% (358/358), done.
Writing objects: 100% (365/365), 9.94 MiB | 1.45 MiB/s, done.
Total 365 (delta 40), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (40/40), done.
remote:
remote: Create a pull request for 'release/awesome' on GitHub by visiting:
remote:      https://github.com/licoded/arcolinux-config/pull/new/release/awesome
remote:
To github.com:licoded/arcolinux-config.git
 * [new branch]      release/awesome -> release/awesome
branch 'release/awesome' set up to track 'origin/release/awesome'.
licoded commented 2 years ago

VSCode

启动VSCode Setting Sync需要密码

Visual Studio Code asking to authenticate 'Default keyring' everytime I start

关掉之后报错且应该不能同步

NPM Scripts环境变量没有加载

使用 [S]+Shift+D[S]+F2 快捷键启动VSCode有如下报错,从命令行启动没有该报错。

> Executing task: pnpm run test:watch <

zsh:1: command not found: pnpm
The terminal process "/usr/bin/zsh '-c', 'pnpm run test:watch'" failed to launch (exit code: 127).

Terminal will be reused by tasks, press any key to close it.

settings.json 中添加如下配置即可

注意平台 linuxzsh 要根据自己的使用环境修改设置

  "terminal.integrated.profiles.linux": {
    "zsh": {
      "path": "/bin/zsh",
      "args": [
        "-i",
      ],
    }
  },
  "terminal.integrated.defaultProfile.linux": "zsh",
licoded commented 2 years ago

Qv2ray

修改默认分组,重启后订阅链接没了;新建一个分组搞即可。

licoded commented 2 years ago

屏幕

Plan A

xrandr --output DP-1 --auto --output eDP-1 --auto || xrandr --output eDP-1 --auto

Plan B

取出最后一个连接的显示器

xrandr | awk -F ' ' '$2 == "connected" {print $1}' | tail -1 | xargs -i xrandr --output {} --auto
licoded commented 2 years ago

Node

# nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
# node
nvm list --lts
export NVM_NODEJS_ORG_MIRROR=http://npm.taobao.org/mirrors/node
nvm install v14.19.1
# pnpm
curl -fsSL https://get.pnpm.io/install.sh | sh -
licoded commented 2 years ago

Neovim

安装后命令是 nvim

licoded commented 2 years ago

Awesome

配置文件

一些说明

快捷键

空白

更改桌面布局样式

调整系统字体

licoded commented 2 years ago

Microsoft Edge

microsoft-edge-stable-bin

系统语言英文,设置中文翻译

先点击Translate to English,然后点击地址栏右侧的翻译语言下拉选择框,改为默认翻译为中文

image

去掉烦人的三个点

image

BUG

  1. 使用flameshot后Edge的右键菜单就会闪烁但显示不出来
licoded commented 2 years ago

File Manager

打开快捷键 CTRL+ALT+F

symbol link 损坏原因:其他盘(win盘)需要先手动去访问触发授权读取弹窗

licoded commented 2 years ago

立即关机

shutdown now

立即重启

shutdown -r now

休眠

systemctl suspend