aboutsummaryrefslogtreecommitdiff
path: root/shut-down
blob: 5d7b0f37a59ac8a424aa0751df27fa29a528e0a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash

# 
#bspc query -N -n .window && shutdown

if bspc query -N -n .window &> /dev/null; then
  bspc query -N -n .hidden | xargs -I ID -n 1 bspc node ID -g hidden=off
  notify "No"
else
  if [ "$1" = "reboot" ]; then
    reboot
  else
    shutdown now
  fi
fi