调整bspwm启动逻辑

master
yutent 2023-07-14 09:57:13 +00:00 committed by GitHub
parent c5fa89201d
commit cf97174fb8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 30 additions and 9 deletions

View File

@ -35,7 +35,8 @@ xrandr --output HDMI-2 --auto --right-of HDMI-1
xrandr --output HDMI-1 --mode 1920x1080 --rate 60
# 干掉已经运行的进程
killall -9 sxhkd picom nm-applet dunst xsettingsd polybar plank xss-lock
#killall -9 sxhkd picom nm-applet dunst xsettingsd polybar plank xss-lock
killall -9 sxhkd xsettingsd
# 2个显示器, 左显示器配置4个工作区, 右显示器只配置1个工作区
bspc monitor HDMI-1 -d I II III IV
@ -71,6 +72,8 @@ bspc rule -r *:*
# 默认所有的应用都浮动
bspc rule -a *:* state=floating focus=on follow=on
bspc rule -a Plank layer=above
# 终端默认设为浮动
# bspc rule -a Alacritty state=floating focus=on follow=on
# bspc rule -a Xfce4-terminal state=floating focus=on follow=on
@ -99,22 +102,40 @@ if [[ ! "$(pidof xfce-polkit)" ]]; then
xfce-polkit &
fi
if [[ ! "$(pidof polybar)" ]]; then
polybar main -r &
fi
if [[ ! "$(pidof dunst)" ]]; then
dunst &
fi
if [[ ! "$(pidof plank)" ]]; then
plank &
fi
#if [[ ! "$(pidof nm-applet)" ]]; then
# nm-applet &
#fi
# 启动配套的服务
# 睡眠/休眠时, 自动锁屏
if [[ ! "$(pidof xss-lock)" ]]; then
xss-lock --transfer-sleep-lock -- ~/.local/bin/scripts/xlock.sh &
fi
# 启动顶栏, 键盘热键, 通知, dock等
polybar main -r &
# 键盘热键
sxhkd &
nm-applet &
dunst &
plank &
## 一些已经用systemd启动的服务
# pipewire, mpd, blueman
if [[ ! "$(pidof picom)" ]]; then
picom -b --experimental-backends
fi
# 每次启动时, 删除该文件
rm ~/.cxoffice/wechat/.eval
picom -b --experimental-backends