update
- remove powershell deps - rewrite readme - fully use YukiLauncher
This commit is contained in:
@@ -230,7 +230,7 @@ window-rule {
|
||||
open-floating true
|
||||
default-floating-position x=8 y=8 relative-to="bottom-right"
|
||||
open-focused false
|
||||
open-on-output "HDMI-A-1"
|
||||
open-on-output "eDP-1"
|
||||
}
|
||||
|
||||
spawn-at-startup "waybar"
|
||||
@@ -253,8 +253,8 @@ binds {
|
||||
Mod+E hotkey-overlay-title="Explorer (yazi)" { spawn "foot" "yazi"; }
|
||||
//Shift+Mod+Return hotkey-overlay-title="Steam" { spawn "steam"; }
|
||||
|
||||
Mod+F12 hotkey-overlay-title="Open Projects ... (VSCode)" { spawn "~/.local/bin/fuzzel-vsc-entries.ps1"; }
|
||||
Mod+Space hotkey-overlay-title="Run a command ... (fuzzel)" { spawn "~/.local/bin/fuzzel-win+r.ps1"; }
|
||||
Mod+F12 hotkey-overlay-title="Open Projects ... (VSCode)" { spawn "~/.niri-dotfiles/bin/fuzzel-vsc-entries.sh"; }
|
||||
Mod+Space hotkey-overlay-title="Run a command ... (fuzzel)" { spawn "~/.niri-dotfiles/bin/fuzzel-win+r.sh"; }
|
||||
|
||||
// Applications such as remote-desktop clients and software KVM switches may
|
||||
// request that niri stops processing the keyboard shortcuts defined here
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
/home/agxcoy/.config/systemd/user/mpris-proxy.service
|
||||
@@ -1 +0,0 @@
|
||||
/home/agxcoy/.config/systemd/user/playerctld.service
|
||||
@@ -1,10 +0,0 @@
|
||||
[Unit]
|
||||
Description=Forward bluetooth media controls to MPRIS
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/bin/mpris-proxy
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
[Unit]
|
||||
Description=Keep track of media player activity
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/bin/playerctld daemon
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
|
||||
14
.zprofile
14
.zprofile
@@ -1,11 +1,17 @@
|
||||
# init at each startup
|
||||
mkdir -p /tmp/$USER
|
||||
#ln -sf /tmp/$UID $HOME/.tmp
|
||||
[[ ! -L $HOME/.tmp ]] && rm -f $HOME/.tmp && ln -s /tmp/$USER $HOME/.tmp
|
||||
[ $(readlink -f $HOME/.tmp) = "/tmp/$USER" ] || {
|
||||
rm -f $HOME/.tmp
|
||||
ln -s /tmp/$USER $HOME/.tmp
|
||||
}
|
||||
|
||||
# avoid dumplicate env appending.
|
||||
[[ -f /run/user/$UID/.zshlogon ]] && return
|
||||
touch /run/user/$UID/.zshlogon
|
||||
# [[ -f /run/user/$UID/.zshlogon ]] && return
|
||||
# touch /run/user/$UID/.zshlogon
|
||||
|
||||
export PATH="$HOME/.local/bin:$PATH"
|
||||
PATH="$HOME/.local/bin:$PATH"
|
||||
PATH="$HOME/.niri-dotfiles/bin:$PATH"
|
||||
|
||||
export -U PATH
|
||||
export EDITOR=nano
|
||||
|
||||
10
.zshrc
10
.zshrc
@@ -140,4 +140,14 @@ unset key
|
||||
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
||||
|
||||
# USER MANUAL CONFIGS
|
||||
|
||||
# https://unix.stackexchange.com/questions/608842/zshrc-export-gpg-tty-tty-says-not-a-tty
|
||||
export GPG_TTY=$TTY
|
||||
|
||||
alias ykls='systemctl --user status YukiLauncher.slice'
|
||||
alias yksuspend='systemctl --user freeze YukiLauncher.slice'
|
||||
alias ykcout='systemctl --user thaw YukiLauncher.slice'
|
||||
alias ykexit='systemctl --user stop YukiLauncher.slice'
|
||||
|
||||
alias susp="systemctl --user freeze"
|
||||
alias cont="systemctl --user thaw"
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
#!/usr/bin/pwsh
|
||||
|
||||
$desktop="$env:HOME/Desktop"
|
||||
|
||||
$fsarg=(Get-ChildItem $desktop -FollowSymlink | ForEach-Object {
|
||||
if ($_ -is [System.IO.DirectoryInfo]) { return "$($_.Name)/" }
|
||||
else { return $_.Name }
|
||||
} | fuzzel --dmenu --prompt="Open with VSCode (~/Desktop): ")
|
||||
|
||||
$fsarg -and (Start-Process code -ArgumentList @("$desktop/$fsarg"))
|
||||
15
bin/fuzzel-vsc-entries.sh
Executable file
15
bin/fuzzel-vsc-entries.sh
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
desktop="$HOME/Desktop"
|
||||
|
||||
options=""
|
||||
for item in $(ls $desktop); do
|
||||
options+=$item
|
||||
if [[ -d "$desktop/$item" ]]; then
|
||||
options+='/'
|
||||
fi
|
||||
options+="\n"
|
||||
done
|
||||
|
||||
fsarg=$(echo -en "$options" | fuzzel --dmenu --prompt="Open Project with VSCode:")
|
||||
[ -z "$fsarg" ] || ykrun code "$desktop/$fsarg"
|
||||
@@ -1,8 +0,0 @@
|
||||
#!/usr/bin/pwsh
|
||||
|
||||
$option=(fuzzel --dmenu --prompt-only="Command to execute: ")
|
||||
|
||||
$option -and (
|
||||
# garbage `start-process`.
|
||||
systemd-run --user --scope --slice=AgExecBar.slice --unit="$(($option -split " ")[0])-$PID".scope /bin/sh -c "$option"
|
||||
)
|
||||
3
bin/fuzzel-win+r.sh
Executable file
3
bin/fuzzel-win+r.sh
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
option=$(fuzzel --dmenu --prompt-only="Command to execute: ")
|
||||
[ -z "$option" ] || ykrun $option
|
||||
2
bin/ykrun
Executable file
2
bin/ykrun
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
systemd-run --user --scope --slice=YukiLauncher.slice --unit="$1-$$".scope /bin/sh -c '"$@"' _ "$@"
|
||||
64
readme.md
64
readme.md
@@ -6,51 +6,39 @@
|
||||
|
||||
> [!note]
|
||||
> 本仓库的配置管理方案比较原始:逐个做软链接处理。有觉得`stow`等工具好用,想要重新组织文件树的欢迎 pr.
|
||||
> - `.config/**` -> `$HOME/.config/**`
|
||||
> - `bin` -> `$HOME/.local/bin`
|
||||
> > 其中带后缀(如`.sh`)的脚本仅供 niri 等组件调用,设计上并不希望在终端里启动。
|
||||
>
|
||||
> - `.z*` -> `$HOME/.z*`
|
||||
> - `default-electron-flags` -> `$HOME/.config/*-flags.conf` (code, chrome)
|
||||
> > QQ 不适用这组参数,另见 archlinuxcn 社区论坛。
|
||||
|
||||
> [!note]
|
||||
> 还有一些较早做的配置,以及全局配置(像 sddm)并不方便合进来,由于篇幅和复述可靠性有限,就略过罢。
|
||||
|
||||
## 鸣谢
|
||||
- 雪叶 [@Vescrity](https://github.com/Vescrity) (Yukitoha)
|
||||
- fizzyizzy05 (Isabelle Jackson, mtf)
|
||||
|
||||
## 已知依赖
|
||||
> [!note]
|
||||
> 从 WSL 里测试开始,配这些组件先后花了我两个多月时间。
|
||||
> 恕我很难回忆出都用过什么。
|
||||
> 仅列出**想得起来的**依赖软件包。
|
||||
|
||||
- `niri`,以及`yay -Si`中指定的可选依赖。
|
||||
- `swww`(从 fizzy 那毛的双层背景方案)
|
||||
- ZshIM (`zim`):主要为了 powerlevel10k.
|
||||
- 不再考虑 `oh-my-zsh`.
|
||||
- 也不需要用包管理器装插件(像语法高亮),这些 zim 默认就集成了。
|
||||
- `powershell-bin`:用于便捷地拉起新进程。
|
||||
|
||||
> 在`.sh`里总是纠结用`command &`还是`nohup`还是别的什么。
|
||||
> 而 pwsh 的`start-process`在 Linux 的实现似乎有用到 xdg-open,直接跑命令的效果又类似`command &`,实际用下来感觉不如 sh。
|
||||
> 但胜在容易写。搁 bash 里写`fuzzel-vsc-entries`就只能字符串拼接之后`echo`进管道,pwsh 则支持直接把 .NET 对象送进管道。
|
||||
|
||||
## 后续替换
|
||||
```
|
||||
alacritty -> foot
|
||||
nautilus (gnome files) -> yazi (console)
|
||||
swaylock -> gtklock
|
||||
gnome-keyring -> kwallet (kd6), kwallet-pam (to auto unlock), kwalletmanager (optional)
|
||||
com.saivert.pwvucontrol (flatpak) -> pavucontrol-qt (extra)
|
||||
...
|
||||
```
|
||||
|依赖|配置|备注|
|
||||
|-|-|-|
|
||||
|niri|`.config/niri/config.kdl`|
|
||||
|`fuzzel`|`.config/fuzzel/*`|
|
||||
|`mako`|`.config/mako/*`|
|
||||
|`swww`|`bin/chbg` (bash)|另需`imagemagick`来生成图片的高斯模糊版本。|
|
||||
|`gtklock`|`.config/gtklock/*`|现阶段无法跟`swayidle`合用,尽管其 Wiki 鼓励这么做。|
|
||||
|`xdg-desktop-portal-(gtk\|gnome)`|`.config/xdg-desktop-portal/*-portals.conf`|GNOME 支持最全,但称不上好看(|
|
||||
|`kwallet`|VSCode 试图登录时会弹出向导让你配的。|替代`gnome-keyring`。建议加装`kwallet-pam`,免得 VSCode 自己尝试解锁结果闪退。|
|
||||
|foot|`.config/foot/foot.ini`|
|
||||
|yazi|`.config/yazi/*`|替代`nautilus`;另用`fake-nautilus`移除`nautilus`包。|
|
||||
|fastfetch|`.config/fastfetch/*`|
|
||||
|waybar|`.config/waybar/*`|
|
||||
|`mpris`|`systemctl --user`服务|参见 ArchWiki.|
|
||||
|`pavucontrol-qt`|
|
||||
|
||||
## 参考资源与备注
|
||||
- Nerd 字体:[Monaco Nerd Font Mono (MelodyEcho ver.)](https://glowmem.com/upload/articles/archlinux-note/Monaco_Nerd_Font_Mono-Regular.ttf) 或直接`ttf-monaco-nerd-font`(AUR)。后者在 VSCode 里表现不咋地。
|
||||
|
||||
> [!note]
|
||||
> 壁纸自己用`chbg`生成。
|
||||
|
||||
> [!important]
|
||||
> Niri 里的 linuxqq 不能直接用`default-electron-flags`。改用以下标签:
|
||||
> - `--enable-platform=wayland`
|
||||
> - `--enable-wayland-ime`
|
||||
> - `--wayland-text-input-version=3`
|
||||
>
|
||||
> 至于原因,可参见 archlinuxcn 社区论坛。
|
||||
|
||||
> [!note]
|
||||
> `fcitx5`的配置基本上和 Miku 指南所述一致,就不再合进来了;
|
||||
> 其余各 App 仍有一些兼容问题,排查后再更新此文档。
|
||||
|
||||
Reference in New Issue
Block a user