ysl2 / .dotfiles Goto Github PK
View Code? Open in Web Editor NEWMy dotfiles
My dotfiles
0.12.1可用,高于此版本会提示需要toml配置文件
我的sixel fork版本是0.13.0-dev,不需要配置文件
需要rustup依赖,直接官网安装
I have added desktop file into my fork dwm ysl2/dwm
, so no need to manually add it. It will be auto added when compiling my dwm.
e.g, dwm
sudo vim /usr/share/xsessions/dwm.desktop
# Ref: https://github.com/elken/dwm/blob/master/dwm.desktop
[Desktop Entry]
Encoding=UTF-8
Name=DWM
Comment=Dynamic window manager
Exec=/home/elken/.dwm/bin/start.sh
Icon=dwm
Type=XSession
用于正确分辨率显示:
itksnap --scale 1
Append --no-sandbox %U
into Exec
, like this:
sudo vim /usr/share/applications/qqmusic.desktop
[Desktop Entry]
Name=qqmusic
Exec=/opt/qqmusic/qqmusic --no-sandbox %U
Terminal=false
Type=Application
Icon=qqmusic
StartupWMClass=qqmusic
Comment=Tencent QQMusic
Categories=AudioVideo;
feh --bg-scale /usr/share/desktop-base/emerald-theme/wallpaper/contents/images/2560x1440.svg
Change the file ~/.config/mimeapps.list
The correct name of .desktop
can be found in /usr/share/applications/
~/.scripts/window-manager/fix-touchpad.sh
Ref: https://superuser.com/questions/1059511/how-to-disable-winl-in-windows-10
win_l.reg
, double click to run it.
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System]
"DisableLockWorkstation"=dword:00000001
Install
Install via docker: https://mariadb.com/kb/en/installing-and-using-mariadb-via-docker/
or:
sudo apt install mariadb-server mycli -y
sudo mariadb-secure-installation
Create normal user with root permission
-- Ref: https://www.digitalocean.com/community/tutorials/how-to-create-a-new-user-and-grant-permissions-in-mysql
-- Note: `sammy` is your username, `password` is your strong password.
CREATE USER 'sammy'@'localhost' IDENTIFIED BY 'password';
Login
If you use docker, use:
mariadb -h 127.0.0.1 -P 3306 -u root -p
else, use:
mariadb -u root -p
mariadb -u sammy -p
cat /etc/terminfo/README
This directory is for system-local terminfo descriptions. By default,
ncurses will search ${HOME}/.terminfo first, then /etc/terminfo (this
directory), then /lib/terminfo, and last not least /usr/share/terminfo.
# ~/.bashrc.localhost
export TERMINFO=/lib/terminfo
Window manager: refer to below options. Current is using Option 2
.
Launcher: raycast
ScreenShoter: snipaste
ScreenRecorder: 1001 Record
Terminal: kitty (all localhost settings will take effect after re-login macOS)
Unzip: keka
ABC
.Option 1: yabai & skhd (has bug for WeCom)
Option 2: rectangle & alttab (works well but lack of multi-desktop capability)
desktop文件不识别~,但是可以识别软连接
choco install make
Try this:
:! make -C $LUNARVIM_RUNTIME_DIR/site/pack/packer/start/telescope-fzf-native.nvim
or do make clean
just to be sure:
:! cd $LUNARVIM_RUNTIME_DIR/site/pack/packer/start/telescope-fzf-native.nvim && make clean && make
sudo apt install bluez
sudo systemctl status bluetooth
If disable GDM and directly login by startx, the problem will not occur.
sudo systemctl disable gdm
After disable gdm, the filrefox will be very slow to boot up. Should run these command below to fix this problem:
sudo apt purge xdg-desktop-portal-gnome
sudo apt purge xdg-desktop-portal-gtk
sudo apt purge xdg-desktop-portal
"editor.occurrencesHighlight": "off"
https://github.com/johnalanwoods/maintained-modern-unix
Basic Tool Name | Type (CLI/TUI/GUI) | Note | Installation |
---|---|---|---|
nmtui |
TUI | Network | |
brightnessctl |
CLI | Brightness | |
redshift |
CLI | Brightness | |
bluetuith |
TUI | Bluetooth | |
xrandr |
CLI | Monitor control | |
arandr |
GUI | Monitor control | |
termscp |
TUI | SFTP in terminal | |
nvtop |
TUI | Check GPU status in terminal | |
ncdu |
TUI | Check disk usage | |
htop |
TUI | Check system status | |
feh |
TUI | For desktop wallpaper | |
picom |
TUI | Window transparent | |
flameshot |
GUI | Image capture | |
dunst |
CLI | Show notification | |
udiskie |
GUI | USB mount | |
tlp |
CLI | Power saver | |
lxappearance |
GUI | GTK theme changer |
Other Tool Name | Type (CLI/TUI/GUI) | Note | Installation |
---|---|---|---|
bluetoothctl |
CLI | Bluetooth | |
img2pdf |
CLI | Image to PDF, for Latex | |
pdf2svg |
CLI | PDF to SVG, for Typst | |
qrcp |
CLI | File transfer | |
carbonyl |
TUI | Browser in terminal | By npm |
surf |
GUI | Lightweight browser | |
trans |
CLI | Language translate | |
shell_gpt |
CLI | GPT in shell | |
frp |
CLI | Proxy forward | |
bottom |
TUI | Check system status | |
crlf2lf |
CLI | Change file ending | |
zathura |
GUI | PDF Viewer | |
chafa |
CLI | Terminal image renderer | |
gh2md |
CLI | Export github issues | |
tldraw |
GUI | Whiteboard | |
wechat |
GUI | Official WeChat (but with unofficial flatpak) | |
qq |
GUI | Official QQ | |
gh |
CLI | Official Github CLI | By brew |
color-picker |
GUI | Color picker | By apt |
Ref: https://stackoverflow.com/questions/27962454/disable-chrome-is-out-of-date-notification
/opt/apps/cn.google.chrome/entries/applications/google-chrome.desktop
~/Desktop/google-chrome.desktop
# Add `--simulate-outdated-no-au` flag:
# Exec=/opt/apps/cn.google.chrome/files/google/chrome/google-chrome %U
Exec=/opt/apps/cn.google.chrome/files/google/chrome/google-chrome --simulate-outdated-no-au='Tue, 31 Dec 2099 23:59:59 GMT' %U
Then reboot system.
~/.config/autostart/Autostart.desktop
[Desktop Entry]
Type=Application
Name=Autostart
Exec=/home/yusongli/.autostart.sh > /dev/null 2>&1
Comment=Autostart script
X-GNOME-Autostart-enabled=true
~/.autostart.sh
(Make sure this script is chmod 777)
#!/bin/bash
fcitx5 > /dev/null 2>&1 &
bash ~/.scripts/wm/autostart/keyboard.sh > /dev/null 2>&1 &
Ref: https://askubuntu.com/questions/706528/qt-apps-stopped-inheriting-gtk-themes/748186#748186
sudo apt install qt5-style-plugins
Then,
export QT_QPA_PLATFORMTHEME=gtk2
Or, one time:
QT_QPA_PLATFORMTHEME=gtk2 flameshot
官方添加源的方式:
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
如果之前没有添加过官方的源,就直接添加国内镜像:
sudo flatpak remote-add flathub https://mirror.sjtu.edu.cn/flathub/flathub.flatpakrepo
否则,如果之前添加过官方的源,就将其修改为国内镜像:
sudo flatpak remote-modify flathub --url=https://mirror.sjtu.edu.cn/flathub
# 如果上述出现错误,可尝试:
wget https://mirror.sjtu.edu.cn/flathub/flathub.gpg
sudo flatpak remote-modify --gpg-import=flathub.gpg flathub
如果某次安装被中断,则需要修复:
flatpak repair
Set it to fullscreen
# /usr/share/applications/org.pwmt.zathura.desktop
Exec=zathura %U --mode fullscreen
❯ xinput list
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ OBINS OBINS
AnnePro2 Mouse id=13 [slave pointer (2)]
⎜ ↳ YICHIP Wireless Device Mouse id=14 [slave pointer (2)]
⎜ ↳ YICHIP Wireless Device Consumer Control id=16 [slave pointer (2)]
⎜ ↳ SYNA3073:00 06CB:8265 Mouse id=17 [slave pointer (2)]
⎜ ↳ SYNA3073:00 06CB:8265 Touchpad id=18 [slave pointer (2)]
⎜ ↳ SynPS/2 Synaptics TouchPad id=20 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Video Bus id=7 [slave keyboard (3)]
↳ Video Bus id=8 [slave keyboard (3)]
↳ Sleep Button id=9 [slave keyboard (3)]
↳ OBINS OBINS
AnnePro2 id=10 [slave keyboard (3)]
↳ OBINS OBINS
AnnePro2 Consumer Control id=11 [slave keyboard (3)]
↳ OBINS OBINS
AnnePro2 Keyboard id=12 [slave keyboard (3)]
↳ YICHIP Wireless Device System Control id=15 [slave keyboard (3)]
↳ AT Translated Set 2 keyboard id=19 [slave keyboard (3)]
↳ HP WMI hotkeys id=21 [slave keyboard (3)]
↳ YICHIP Wireless Device Consumer Control id=22 [slave keyboard (3)]
In the command output above, the SYNA3073:00 06CB:8265 Touchpad id=18
is the touchpad, and the AT Translated Set 2 keyboard id=19
is the keyboard.
# Disable the touchpad
xinput disable 18
# Disable the keyboard
xinput disable 19
xinput enable {id}
.sudo apt install nautilus
And follow this to solve the default file manager problem.
Ref: "ssl module in Python is not available" when installing package with pip3
Download and install latest minimal openssl, and make sure to copy all DLLs into system folder in installation wizard.
https://slproweb.com/products/Win32OpenSSL.html
Windows\System32
# Switch
gsettings set com.deepin.dde.keybinding.mediakey capslock '[]'
gsettings set com.deepin.dde.keyboard layout-options '["caps:swapescape"]'
# Restore only capslock
gsettings reset com.deepin.dde.keybinding.mediakey capslock
gsettings reset com.deepin.dde.keyboard layout-options
# Restore all keys
gsettings reset-recursively com.deepin.dde.keybinding.mediakey
gsettings reset-recursively com.deepin.dde.keyboard
# NOTE:
# 1. You should open the `Developer Mode` item in Windows `Settings -> Update & Security -> Developer
# 2. Don't use administrator terminal, instead, use your normal terminal.
git clone git@github.com:ysl2/.dotfiles.git
git clone -c core.symlinks=true git@github.com:ysl2/.dotlinks.git -b windows
# Don't use this to install texlive, instead, install it manually by local install.
choco install texlive --params="'/scheme:full'"
choco install ntop.portable
# Update: don't use conda, instead, use original python
# That's beacuse you might encounter the SSL problem, annoying :-<
choco install miniconda3
# Add to PATH:
# C:\tools\miniconda3
# C:\tools\miniconda3\Scripts
# Cmake
# Add to PATH: C:\Program Files\CMake\bin
Chocolatey v2.2.2
chocolatey 2.2.2
chocolatey-compatibility.extension 1.0.0
chocolatey-core.extension 1.4.0
chocolatey-font-helpers.extension 0.0.4
chocolatey-windowsupdate.extension 1.0.5
clash-for-windows 0.20.2
git 2.43.0
git.install 2.43.0
KB2919355 1.0.20160915
KB2919442 1.0.20160915
KB2999226 1.0.20181019
KB3033929 1.0.5
KB3035131 1.0.3
KB3118401 1.0.5
lazygit 0.40.2
lf 0.26.0
microsoft-windows-terminal 1.19.3172-beta
neovim 0.9.5
nerd-fonts-FiraCode 3.1.1
nodejs 21.4.0
nodejs.install 21.4.0
powershell-core 7.4.0
pwsh 7.4.0
redshift 1.12.0
sharpkeys 3.5.0.20180307
starship 1.17.1
starship.install 1.17.1
sumatrapdf 3.5.2
sumatrapdf.install 3.5.2
vcredist140 14.38.33130
vcredist2015 14.0.24215.20170201
vim 9.0.2146
winrar 6.24.0
34 packages installed.
Lf
You need to set system variable EDITOR
to vim (or any other editor), and link neovide to notepad.exe
to replace default notepad (optional). Use vim to edit single file by pressing e
key, and use neovim to edit project by pressing l
key (I tried to inverse those two behavior but failed, so must be this at least now).
Download
https://mirrors.tuna.tsinghua.edu.cn/CTAN/systems/texlive/Images/texlive.iso
Install
Add to PATH
C:\texlive\2023\bin\windows
sudo apt install texlive-full
其他就不需要了。打开vscode就能好使。
原因:缺少当前内核的头文件,这通常发生在内核更新之后。
sudo apt install linux-headers-"$(uname -r)"
pip uninstall opencv-python
pip install opencv-python-headless
sudo apt-get install libxcb-xinerama0
检查虚拟化:
egrep -c '(vmx|svm)' /proc/cpuinfo
If the output is zero then go to bios settings and enable VT-x (Virtualization Technology Extension) for Intel processor and AMD-V for AMD processor.
安装
sudo apt install qemu-kvm qemu-system qemu-utils python3 python3-pip libvirt-clients libvirt-daemon-system bridge-utils virtinst libvirt-daemon virt-manager -y
sudo systemctl status libvirtd.service
sudo virsh net-start default
sudo virsh net-autostart default
sudo virsh net-list --all
sudo usermod -aG libvirt $USER
sudo usermod -aG libvirt-qemu $USER
sudo usermod -aG kvm $USER
sudo usermod -aG input $USER
sudo usermod -aG disk $USER
Download genymotion
from official website.
Install it, but without sudo (install under /home
as normal user)
Create a new virtual android phone, but it's android version should below 9.0
Download https://github.com/m9rco/Genymotion_ARM_Translation zip file that fit for the virtual machine's android version, then drag drop into virtual machine
Reboot
Install apps by drag drop, finish.
Ref:
Difference between login shell
and non-login shell
.
https://linux.vbird.org/linux_basic/centos7/0320bash.php#settings_bashrc
# $HOME\.pwshrc.localhost.ps1
# NOTE: The function name must starts with a letter.
function s53 {
ssh username@localhost -p 22
}
# You can use it in powershell by `s53`
# NOTE: The double quotes.
ssh-copy-id "username@localhost -p 22"
multi-window power user
考虑hammerspoon,amethyst,yabai
Non-free:
https://manytricks.com/moom/
https://contexts.co/
https://folivora.ai/bettersnaptool
https://magnet.crowdcafe.com/
https://manico.im/
https://folivora.ai/
https://hazeover.com/
https://thelasso.app/
Part-free:
https://www.raycast.com/
Free:
https://github.com/pqrs-org/Karabiner-Elements (18.2k star)
https://github.com/lwouis/alt-tab-macos (10.1k star)
https://github.com/rxhanson/Rectangle (25.1k star)
https://github.com/ianyh/Amethyst (14.4k star)
https://github.com/Hammerspoon/hammerspoon (11.7k star)
https://github.com/dshnkao/SpaceId (352)
https://github.com/koekeishiya/yabai (22.4k star)
https://github.com/nikitabobko/AeroSpace (3.5k star)
https://github.com/fikovnik/ShiftIt (5.5k star)
https://bahoom.com/hyperswitch
Todo:
yabai + raycast + alttab, but yabai has bugs with WeCom.
Try other wm like amethyst and aerospace.
Install
sudo apt install -y docker.io
Set mirror
阿里云加速器(点击管理控制台 -> 登录账号(淘宝账号) -> 左侧镜像工具 -> 镜像加速器 -> 复制加速器地址)
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": ["自己的阿里云镜像链接"]
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker
Without sudo
# Create a Docker group if it doesn't already exist:
sudo groupadd docker
# Add your user to the Docker group:
sudo usermod -aG docker $USER
sudo apt install pm-utils
sudo pm-suspend
sudo pm-hibernate
通过pip可以安装
# Install
pip install pyqt5-tools
# Use
# Method 1: directly
designer
# Method 2: command
pyqt5-tools designer
下面的方法是系统级别,不需要这么麻烦。
sudo apt-get install qttools5-dev-tools qttools5-dev
Windows Registry Editor Version 5.00
; Open files
; Default Git-Bash Location C:\Program Files\Git\git-bash.exe
[HKEY_CLASSES_ROOT\*\shell\Open Git Bash]
@="Open Git Bash"
"Icon"="C:\\git-sdk-64\\git-bash.exe"
[HKEY_CLASSES_ROOT\*\shell\Open Git Bash\command]
@="\"C:\\git-sdk-64\\git-bash.exe\" \"--cd=%1\""
; This will make it appear when you right click ON a folder
; The "Icon" line can be removed if you don't want the icon to appear
[HKEY_CLASSES_ROOT\Directory\shell\bash]
@="Open Git Bash"
"Icon"="C:\\git-sdk-64\\git-bash.exe"
[HKEY_CLASSES_ROOT\Directory\shell\bash\command]
@="\"C:\\git-sdk-64\\git-bash.exe\" \"--cd=%1\""
; This will make it appear when you right click INSIDE a folder
; The "Icon" line can be removed if you don't want the icon to appear
[HKEY_CLASSES_ROOT\Directory\Background\shell\bash]
@="Open Git Bash"
"Icon"="C:\\git-sdk-64\\git-bash.exe"
[HKEY_CLASSES_ROOT\Directory\Background\shell\bash\command]
@="\"C:\\git-sdk-64\\git-bash.exe\" \"--cd=%v.\""
/etc/profile.d/git-sdk.sh
, line 481, sdk welcome
Ref: https://blog.csdn.net/u014712482/article/details/80568540
sudo apt-get install ttf-mscorefonts-installer
sudo fc-cache -f -v
对于matplotlib或者seaborn,还需要删掉缓存文件夹
import matplotlib as plt
pit.get_cachedir() # 默认位置是`~/.cache/matplotlib`
Install:
sudo apt install redshift
Usage:
# Set to default night mode colur
redshift -P -O 4500K
# Reset
redshift -x
Ref:
sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.