Browse Source

Write all conditionals in wm with [[ ]]

master
Maxime Wack 1 year ago
parent
commit
3c442f2782
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      .config/bin/wm

+ 4
- 4
.config/bin/wm View File

@@ -63,7 +63,7 @@ clear_desktop ()

popup ()
{
if [ $# -eq 0 ];then
if [[ $# -eq 0 ]];then
usage
fi

@@ -71,7 +71,7 @@ popup ()
shift

# If the program is not yet running, launch it and monitor the node creation
if [ -z `xdotool search --classname $name` ];then
if [[ -z `xdotool search --classname $name` ]];then
bspc subscribe node_add --count 1 | cut -d ' ' -f 5 > /tmp/win_${name} &
kitty --name $name $*
sleep .5
@@ -85,7 +85,7 @@ peek ()
{
case $1 in
left|right)
if [ `bspc config --desktop focused $1_padding` -gt 0 ]; then
if [[ `bspc config --desktop focused $1_padding` -gt 0 ]]; then
bspc config --desktop focused $1_padding 0
else
bspc config --desktop focused $1_padding 500
@@ -117,7 +117,7 @@ goto ()
case $1 in
next)
# Create a new desktop if needed
if [ "$current" -eq "$last" ]; then
if [[ "$current" -eq "$last" ]]; then
let "last += 1"
echo $last > $LASTDESK
bspc monitor --add-desktops $last


Loading…
Cancel
Save