shell-scripts: Use [[ instead of [ where possible
Replace all occurrences of [ with [[ in bash and zsh scripts and configs. Performance wise it makes sense to use the builtin instead of calling an external command also when from a functionality stand point `test` would suffice.
This commit is contained in:
@@ -24,7 +24,7 @@ if ! pgrep -ax polybar >/dev/null 2>&1; then
|
||||
primary="$(xrandr -q | grep primary | cut -d' ' -f1)"
|
||||
for m in $(polybar --list-monitors | cut -d':' -f1); do
|
||||
export TRAY_POS=none
|
||||
[ "$m" != "$primary" ] || export TRAY_POS=right
|
||||
[[ "$m" != "$primary" ]] || export TRAY_POS=right
|
||||
export MONITOR="$m"
|
||||
polybar --reload -c "$BASE_DIR/config" main &
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user