Update
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
bspc subscribe node_add | while read -r _ _ desktop _ node; do
|
function node_monitor {
|
||||||
|
while read -r _ _ desktop _ node; do
|
||||||
num=$(bspc query -N -d $desktop | grep -f <(bspc query -N -n .leaf) | wc -l)
|
num=$(bspc query -N -d $desktop | grep -f <(bspc query -N -n .leaf) | wc -l)
|
||||||
|
if [ $1 = "add" ]; then
|
||||||
if [ $num = "1" ];then
|
if [ $num = "1" ];then
|
||||||
xprop -id "$node" -f _PICOM_ROUNDED 32c -set _PICOM_ROUNDED 0
|
xprop -id "$node" -f _PICOM_ROUNDED 32c -set _PICOM_ROUNDED 0
|
||||||
else
|
else
|
||||||
@@ -8,12 +10,15 @@ bspc subscribe node_add | while read -r _ _ desktop _ node; do
|
|||||||
xprop -id "$node" -remove _PICOM_ROUNDED
|
xprop -id "$node" -remove _PICOM_ROUNDED
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
done &
|
elif [ $1 = "remove" ];then
|
||||||
bspc subscribe node_remove | while read -r _ _ desktop _ node; do
|
|
||||||
num=$(bspc query -N -d $desktop | grep -f <(bspc query -N -n .leaf) | wc -l)
|
|
||||||
if [ $num = "1" ];then
|
if [ $num = "1" ];then
|
||||||
bspc query -N -d | while read -r node; do
|
bspc query -N -d | while read -r node; do
|
||||||
xprop -id "$node" -f _PICOM_ROUNDED 32c -set _PICOM_ROUNDED 0
|
xprop -id "$node" -f _PICOM_ROUNDED 32c -set _PICOM_ROUNDED 0
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
done &
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
bspc subscribe node_add | node_monitor add &
|
||||||
|
bspc subscribe node_remove | node_monitor remove &
|
||||||
|
|||||||
@@ -101,5 +101,7 @@ source $ZSH/oh-my-zsh.sh
|
|||||||
# Example aliases
|
# Example aliases
|
||||||
# alias zshconfig="mate ~/.zshrc"
|
# alias zshconfig="mate ~/.zshrc"
|
||||||
# alias ohmyzsh="mate ~/.oh-my-zsh"
|
# alias ohmyzsh="mate ~/.oh-my-zsh"
|
||||||
|
export GPG_TTY=$(tty)
|
||||||
|
|
||||||
alias vim=nvim
|
alias vim=nvim
|
||||||
ufetch
|
ufetch
|
||||||
|
|||||||
Reference in New Issue
Block a user