From 29041eb5126d5a0d5245f70b4b6f891f93793b59 Mon Sep 17 00:00:00 2001 From: srdusr Date: Thu, 4 Jan 2024 22:42:57 +0200 Subject: Autostart applets for systray --- .config/bspwm/bspwmrc | 49 +++++++++++++++++++++++++++++++------------------ 1 file changed, 31 insertions(+), 18 deletions(-) diff --git a/.config/bspwm/bspwmrc b/.config/bspwm/bspwmrc index 4254361..b5718ae 100755 --- a/.config/bspwm/bspwmrc +++ b/.config/bspwm/bspwmrc @@ -4,9 +4,9 @@ #░█▀▄░▀▀█░█▀▀░█▄█░█░█ #░▀▀░░▀▀▀░▀░░░▀░▀░▀░▀ -bspc monitor -d 1 2 3 4 5 # 7 8 9 10 -#bspc monitor LVDS-1 -d 1 2 3 4 5 -#bspc monitor HDMI-1 -d 6 7 8 9 0 +#bspc monitor -d 1 2 3 4 5 # 7 8 9 10 +bspc monitor LVDS-1 -d 1 2 3 4 5 +bspc monitor HDMI-1 -d 6 7 8 9 0 ###---Global Settings---### #bspc rule -a '*' --one-shot state=below private=border_width:10 @@ -44,7 +44,7 @@ bspc config presel_feedback_color "#BF616A" # remove all rules first bspc rule -r *:* -#bspc rule -a Plank layer=above border=off +bspc rule -a Plank layer=above border=off ###---Autostart---#### pgrep -x sxhkd >/dev/null || sxhkd & @@ -82,10 +82,10 @@ bspc rule -a heads-up-display sticky=on state=floating rectangle=360x160+990+40 # Virtual keyboard bspc rule -a Onboard sticky=on state=floating rectangle=700x205+480-89 -#[ "$1" = 0 ] && { -# nm-applet & -# #plank & -#} +[ "$1" = 0 ] && { + nm-applet & + # #plank & +} #pkill xfce4-power-manager #sleep 1 && nice -n 1 xfce4-power-manager & @@ -97,6 +97,16 @@ bspc rule -a Onboard sticky=on state=floating rectangle=700x205+480-89 #sleep 2 && nice -n 2 parcellite & #pkill blueman-manager #sleep 2 && nice -n 2 blueman-manager & +#nohup onboard & /dev/null & +# Restart default apps + +declare -a restart=(xfce4-power-manager +plank flameshot onboard parcellite blueman-applet) +for i in "${restart[@]}"; do + pgrep -x "$i" | xargs kill + sleep 0.5 + eval "$i" & +done if [[ ! $(pidof stalonetray) ]]; then stalonetray & @@ -105,6 +115,9 @@ if [[ ! $(pidof stalonetray) ]]; then touch "/tmp/syshide.lock" fi +xdotool search --sync --class Onboard windowunmap --sync %@ +#xdo hide -N Onboard + # Eww pkill eww eww daemon @@ -123,16 +136,16 @@ nohup env/bin/python3 "$HOME"/.scripts/click_resize.py >/tmp/click_resize.log 2> #"$(which eww)" -c "$HOME"/.config/eww --restart open bar & # Fullscreen -#bspc subscribe node_state | while read -r _ _ _ _ state flag; do -# if [[ "$state" != fullscreen ]]; then continue; fi -# if [[ "$flag" == on ]]; then -# xdo lower -N Plank -# #"$(which eww)" -c "$HOME"/.config/eww close-all -# else -# xdo raise -N Plank -# #"$(which eww)" -c "$HOME"/.config/eww open bar -# fi -#done & +bspc subscribe node_state | while read -r _ _ _ _ state flag; do + if [[ "$state" != fullscreen ]]; then continue; fi + if [[ "$flag" == on ]]; then + xdo lower -N Plank + #"$(which eww)" -c "$HOME"/.config/eww close-all + else + xdo raise -N Plank + #"$(which eww)" -c "$HOME"/.config/eww open bar + fi +done & # Check if title-bar is already running if ! pgrep -x "title-bar" >/dev/null; then -- cgit v1.2.3