diff options
| author | 2015-09-03 13:30:00 +0200 | |
|---|---|---|
| committer | 2015-09-03 13:30:00 +0200 | |
| commit | b488df4f931c990ee2f754ed359605e5763a833f (patch) | |
| tree | 32c91eff01b00db6bb104f1d645456e0877d0bcf /herbstluftwm/.config | |
| parent | acff565cc6863c6e05e357b708d0816a332480d9 (diff) | |
| download | dotfiles-b488df4f931c990ee2f754ed359605e5763a833f.tar.gz dotfiles-b488df4f931c990ee2f754ed359605e5763a833f.tar.bz2 dotfiles-b488df4f931c990ee2f754ed359605e5763a833f.zip | |
Fixed duplicating panels
Diffstat (limited to 'herbstluftwm/.config')
| -rwxr-xr-x | herbstluftwm/.config/herbstluftwm/start_panel.sh | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/herbstluftwm/.config/herbstluftwm/start_panel.sh b/herbstluftwm/.config/herbstluftwm/start_panel.sh index e573a53..42e33fd 100755 --- a/herbstluftwm/.config/herbstluftwm/start_panel.sh +++ b/herbstluftwm/.config/herbstluftwm/start_panel.sh | |||
| @@ -11,12 +11,12 @@ if [ -z "$geometry" ] ;then | |||
| 11 | fi | 11 | fi |
| 12 | 12 | ||
| 13 | # Make sure only one instanve per monitor is running | 13 | # Make sure only one instanve per monitor is running |
| 14 | lockfile="/tmp/start_panel-$monitor.lck" | 14 | pids=$(ps x | grep "$0 $monitor" | awk '{print $1}') |
| 15 | if [ -e "$lockfile" ] && kill -0 $(cat $lockfile); then | 15 | for pid in $pids; do |
| 16 | pkill -P $(cat $lockfile) | 16 | if [ $pid != $$ ]; then |
| 17 | fi | 17 | pkill -P $pid |
| 18 | trap "rm -f $lockfile; exit" INT TERM EXIT | 18 | fi |
| 19 | echo "$$" > "$lockfile" | 19 | done |
| 20 | 20 | ||
| 21 | # Geometry has the format W H X Y | 21 | # Geometry has the format W H X Y |
| 22 | x=$(echo "${geometry[0]} + $window_p" | bc) | 22 | x=$(echo "${geometry[0]} + $window_p" | bc) |
