From 5c314595a0e032e277edd08b74e2e9915ee71844 Mon Sep 17 00:00:00 2001 From: Salt Date: Tue, 17 Jul 2018 16:35:16 -0500 Subject: [PATCH] bspwm: Tidy up the startup script, add OpenBSD support Still needs bash, though TODO: Fix that --- .config/bspwm/bspwmrc | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/.config/bspwm/bspwmrc b/.config/bspwm/bspwmrc index b3e1376f..0fd94dab 100755 --- a/.config/bspwm/bspwmrc +++ b/.config/bspwm/bspwmrc @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2017 rehashedsalt/vintagesalt # @@ -85,24 +85,23 @@ xrdbupdate ## SERVICES AND DAEMONS feh --randomize --bg-fill ~/Pictures/Wallpapers/.active & -if [[ $(pgrep sxhkd) ]]; then - killall sxhkd +services=(sxhkd polybar conky dunst compton) +for service in $services; do + kill $(pgrep service) +done +# Don't start the compositor in a VM +if [[ $(hostname) != "vm"* ]]; then + compton & fi -sxhkd & -if [[ $(pgrep polybar) ]]; then - killall polybar -fi -$HOME/.config/polybar/start.sh & -if [[ $(pgrep compton) ]]; then - killall compton -fi -compton& -if [[ $(pgrep conky) ]]; then - killall conky +# Different startup for OpenBSD and Linux +if [[ $(uname) == "Linux" ]]; then + compton & + $HOME/.config/polybar/start.sh & + sxhkd & +else + sxhkd & fi +# Start these all the time regardless of platform conky& -if [[ $(pgrep dunst) ]]; then - killall dunst -fi dunst&