From cf97174fb84691ced3e890a1c49c1e3422fa584a Mon Sep 17 00:00:00 2001 From: yutent Date: Fri, 14 Jul 2023 09:57:13 +0000 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4bspwm=E5=90=AF=E5=8A=A8?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- home/config/bspwm/bspwmrc | 39 ++++++++++++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 9 deletions(-) diff --git a/home/config/bspwm/bspwmrc b/home/config/bspwm/bspwmrc index d40308d..aa43d22 100644 --- a/home/config/bspwm/bspwmrc +++ b/home/config/bspwm/bspwmrc @@ -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 + # 启动配套的服务 # 睡眠/休眠时, 自动锁屏 -xss-lock --transfer-sleep-lock -- ~/.local/bin/scripts/xlock.sh & +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