baskerville / bspwm

A tiling window manager based on binary space partitioning

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BSPWM freezes after being afk for around 20-30 minutes

somil0701 opened this issue · comments

Every time I am AFK for around 20-30 minutes, the BSPWM freezes and i have to pkill -u user_name every time in order to login again. This issue is same for me as well as for my other PC's too. Please point me out if I am missing something. Here is my attached bspwmrc config file.

#! /bin/sh

#PYWAL
. "${HOME}/.cache/wal/colors.sh"
adjust_color_lightness() {
  # Input hex color code
  original_color="$1"

  # Extract the RGB components
  red=$(echo $original_color | cut -c 2-3)
  green=$(echo $original_color | cut -c 4-5)
  blue=$(echo $original_color | cut -c 6-7)

  # Convert hex to decimal
  red_dec=$((16#$red))
  green_dec=$((16#$green))
  blue_dec=$((16#$blue))

  # Increase lightness by the specified factor
  lightness_increase=$2
  new_red_dec=$(echo "$red_dec * $lightness_increase" | bc)
  new_green_dec=$(echo "$green_dec * $lightness_increase" | bc)
  new_blue_dec=$(echo "$blue_dec * $lightness_increase" | bc)

  # Ensure the values are within the valid range (0-255)
  new_red_dec=$(printf "%.0f" $new_red_dec)
  new_green_dec=$(printf "%.0f" $new_green_dec)
  new_blue_dec=$(printf "%.0f" $new_blue_dec)

  # Convert decimal back to hex
  new_red=$(printf "%02X" $new_red_dec)
  new_green=$(printf "%02X" $new_green_dec)
  new_blue=$(printf "%02X" $new_blue_dec)

  # Print the new hex color code
  echo "#$new_red$new_green$new_blue"
}

#bspc monitor -d 1 2 3 4 5
#bspc monitor -d    ﭮ   

bspc config normal_border_color "$(adjust_color_lightness $color8 1.5)"
bspc config focused_border_color "$color4"
bspc config border_width         2
bspc config window_gap          5
bspc config focus_follows_pointer true
bspc config bottom_padding -10

bspc config split_ratio          0.50
bspc config borderless_monocle   false 
bspc config single_monocle       false 
bspc config gapless_monocle      false 

bspc rule -a "TeamViewer" state=floating
bspc rule -a "Blueman-manager" state=floating
bspc rule -a Emacs state=tiled
bspc rule -a "ru-turikhay-tlauncher-bootstrap-Bootstrap" state=floating
bspc rule -a "Yad" state=floating
bspc rule -a MEGAsync state=floating border=off
bspc rule -a Gimp desktop='^8' state=floating follow=on
bspc rule -a Chromium desktop='^2'
bspc rule -a mplayer2 state=floating
bspc rule -a Kupfer.py focus=on
bspc rule -a Screenkey manage=off

bspc config pointer_motion_interval 1

# autostart
compfy -fb --backend glx --config ~/.config/compfy/compfy.conf &
setxkbmap us &
xsetroot -cursor_name left_ptr
xrdb -merge ~/.Xresources &
wal -R
killall -KILL xidlehook
xidlehook --not-when-fullscreen --timer 1800 "systemctl suspend" "" --socket "/tmp/xidlehook.sock" &
~/.local/bin/video-wall.sh &
pgrep -u $(whoami) -f "xss-lock" || xss-lock -- betterlockscreen --lock &
pgrep -u $(whoami) -f "polybar" || ~/.local/bin/launchbar.sh &
pgrep -u $(whoami) -f "sxhkd" || sxhkd &
pgrep -u $(whoami) -f "dunst" || dunst &
pgrep -u $(whoami) -f "greenclip" || greenclip daemon &
pgrep -u $(whoami) -f "bspdd.sh" || ~/.local/bin/bspdd.sh &
pgrep -u $(whoami) -f "lxsession" || lxsession -s BSPWM -e BSPWM &
#pgrep -u $(whoami) -f "syncthing" || syncthing --no-browser &

When did this issue start? I recently started experiencing a similar issue but it happens intermittently on startup. Every bspc command seems to hang until I click a window, and all commands execute immediately. I'm waiting for the next occurrence to get a backtrace.

Recently started experiencing bspwm to freeze as well, and same with the bspc command. But I have no clue as to why at this point.